Id
int64
1.68k
75.6M
PostTypeId
int64
1
1
AcceptedAnswerId
int64
1.7k
75.6M
Question
stringlengths
7
2.03k
Answer
stringlengths
0
2.25k
Image
imagewidth (px)
4
9.41k
10,340,360
1
10,341,789
This framework is and doesn't support to upload, so i decided to fix the framework. In the I did this by adding the entry JPG/JPEG/PPTX ''' private static $SUPPORTED_FILETYPES = array( 'JPG'=>'image/jpeg', 'JPEG'=>'image/jpeg', 'TXT'=>'text/plain', 'CSV'=>'text/csv', 'TSV'=>'text/tab-separated-values', 'TAB'=>'text/tab-separated-values', 'HTML'=>'text/html', 'HTM'=>'text/html', 'DOC'=>'application/msword', 'ODS'=>'application/vnd.oasis.opendocument.spreadsheet', 'ODT'=>'application/vnd.oasis.opendocument.text', 'RTF'=>'application/rtf', 'SXW'=>'application/vnd.sun.xml.writer', 'XLS'=>'application/vnd.ms-excel', 'XLSX'=>'application/vnd.ms-excel', 'PPT'=>'application/vnd.ms-powerpoint', 'PPTX'=>'application/vnd.ms-powerpoint', 'PPS'=>'application/vnd.ms-powerpoint'); ''' It's working fine for the .pptx and for the jpeg/jpg the upload is working completely fine but once in Google Docs it is showing like a doc... There: <IMAGE>
Your images are being converted into the Google Docs native format, to upload them as files, you have to append ?convert=false to the upload uri: <URL>
10,086,810
1
10,087,217
I often get finished designs where a designer made the background and draw where the buttons should be placed. Like on this sketch image <IMAGE> The background in this example is simple, but in design it has a lot of graphics where each button has to be placed to its designed location or the final screen will not look nice. So far, in order to place the buttons on each screen and resolution, I had to make a constant location values for MDPI and then using the 'scale' value ('getResources().getDisplayMetrics().density') calculated the locations for other resolutions. This is a very long and cumbersome process, so I was wondering if there is a better way. Which methodology do you use when you want to locate buttons or other elements to its precise locations?
Absolute positioning of screen elements is inappropriate in most cases on Android as there are so many devices and screens. The best approach is usually to use view groups like the RelativeLayout and place items relative to each other, whilst providing bitmaps at the various screen densities. However you should be able to get what you need from doing this. It is best to have designs that include an element of flexibility, so if the designs require everything to be in exactly the right place I'd venture to suggest that the design is the problem, not Android.
31,099,259
1
31,099,330
''' par(mfrow=c(1,2)) plot(1:12, log = "y") plot(1:2, xaxs = "i") ''' <IMAGE> However, when I try to do a side-by-side densityplot the plots get output seperately: ''' # load the stud.recs dataset library(UsingR) par(mfrow=c(1,2)) densityplot(stud.recs$sat.v) densityplot(stud.recs$sat.m) ''' Why is 'par(mfrow=c(1,2))' not working for the density plots?
'densityplot' produces lattice plots (which are different to base plots). So in order to have them side by side you need to do: ''' library(UsingR) par(mfrow=c(1,2)) a <- densityplot(stud.recs$sat.v) b <- densityplot(stud.recs$sat.m) #this is the print.lattice method below # ?print.trellis for help print(a, position = c(0, 0, 0.5, 1), more = TRUE) print(b, position = c(0.5, 0, 1, 1)) ''' <IMAGE>
26,304,680
1
26,305,754
<IMAGE>. This is inconsistent and only appears to happen in firefox. A refresh of the page will bring the icons when it does happen, and it leaves no errors or anything in the console. The buttons do still work, but a client has been complaining about this. Any help would be appreciated, my googling skills are usually up to par but I haven't seen a lot of people with a similar issue and am kinda stumped as is without any errors in the console to go by.
This is CKEditor's high contrast mode. You can read more about it in the <URL> article. It seems that for some reason CKEditor thinks that the operating system's high contrast mode is enabled so it enables its. The detection code is here: <URL> Maybe it will give you some ideas why it may happen that on this specific page the HC mode is enabled. If not you can try executing this code right after the script tag which includes 'ckeditor.js': ''' CKEDITOR.env.hc = false; CKEDITOR.env.cssClass = CKEDITOR.env.cssClass.replace( / cke_hc/, '' ); ''' This should be able to switch HC mode off.
17,754,043
1
17,754,380
I'm writing a framework written in Objective-C and I've just encountered an issue after trying to link the framework target to another project. When I compile this last project, Xcode shows the error ''AFHTTPClient.h' file not found'. My project is structured in this way : the headers I wrote by myself are public and the headers from the libraries I'm using are in a project visibility, thus the developer isn't polluted with unnecessary files. <IMAGE> The 'JPImgurKit.h' file imports the file 'JPImgurClient.h' (and other ones) which imports the 'AFHTTPClient.h' file and fails for it... When I put this last file in the public section it works (until another private file is imported) but I would like to avoid this, is it possible?
Public headers must not import private headers. There should be nothing in your public header that relies on private data structures. If the caller has to know about the private data structure, then it's not private. If the caller doesn't need to know about the private data structure, there's no reason to include it in the public header. You'd have to give more details about your particular header (what parts of 'AFHTTPClient' are in 'JPImgrClient'?) That said, you should not privately include a common library like AFNetworking. There may be other frameworks that require it (including the main program). If you include it privately then there will be collisions which will be very challenging for the end developer to resolve. You need to let your users know that they need to include AFNetworking along with your package. You cannot easily hide this implementation detail without causing your users a lot of headaches.
14,876,367
1
14,876,490
I have developed a media player using VideoView for playing videos. It works fine but it has an issue that there is a white space at bottom of playing video. You can check my code and screen shot of the player. Please help me in this respect I would be very thankful to you. Thanks in advance. <IMAGE> ''' <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" > <VideoView android:id="@+id/video_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> '''
This should work, it will stretch your video to fill all the screen: ''' <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <VideoView android:id="@+id/videoViewRelative" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_width="fill_parent" android:layout_height="fill_parent"> </VideoView> </RelativeLayout> '''
14,055,343
1
14,122,335
I am having one array like this. The tree structure of this array is very big. I want to print the array using the smarty tags in the html file. I am using this code to do this, Assigned like this in PHP file, '$smarty->assign("arrForumData", $arrForumData);' In HTML File like this for single dimension array. ''' {foreach item=foo from=$arrForumData} {$foo.question} {$foo.name} etc... {/foreach} ''' I dont know how to print array which is like below in smarty. Please guide me how to print multidimension array's in smarty. Hope my question is clear. thanks in advance. <IMAGE>
Exact answer. Working perfect for me. ''' {foreach name=outer item=v from=$arrForumData} {$v[0].question_id} {$v[0].project_id} {$v[0].name} {$v[0].email} {$v[0].question} {$v[0].created_on} {foreach key=key item=item from=$v[1]} {$item.aQId} {$item.aAns} {$item.aName} {$item.aEmail} {$item.aDate} {/foreach} {/foreach} '''
27,502,488
1
27,502,568
<IMAGE> I want to add a control at end of activity, There is my activity xml file, I need note_date be at end of activity. Thank you all. ''' <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <EditText android:id="@+id/note_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/note_title_hint" /> <EditText android:id="@+id/note_body" android:layout_width="match_parent" android:layout_height="401dp" android:gravity="top" android:hint="@string/note_body_hint" android:inputType="textMultiLine" > <requestFocus /> </EditText> <EditText android:id="@+id/note_date" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/note_date_hint" android:inputType="datetime" /> '''
try this ''' <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/note_date" android:orientation="vertical" > </LinearLayout> <EditText android:id="@+id/note_date" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:ems="10" > <requestFocus /> </EditText> '''
13,435,078
1
13,441,101
''' if x->a and y-> b then from x->a == xy-->ay [ir2] xy-->a [ir4] from y->b == xy-->xb [ir2] xy-->b [ir4] therefore xy-->ab [ir5] ''' <IMAGE> But elmasri navathe says , x-->a and y-->b DOES NOT IMPLY xy-->ab i am just starting with functional dependency , so could some one point out what i am missing ?
I just checked C J DATE , where in chapter 11 , page 339 it lists a rule called composition , if a->b , c->d then ac->bd , so that answers part of my query but am curious as to why it says otherwise in navathe .
11,257,639
1
11,259,992
I have a 'UIProgressView' which I want to look like this image. I have set the progress color but I am not sure to set unprogressed color (white color in image). <IMAGE>
Here is the simple solution I myself found on exploring properties for UIProgressView : ''' progressView.trackTintColor = [UIColor whiteColor]; '''
39,176,684
1
39,176,814
I was wondering if anyone knows how to disable the feature in WebStorm when a function is called the variable doesn't turn white. I've set the default color to green but when I call that function it turns white. I've look around in the preference area but I'm kind of stuck now...Thanks Example of the variable "Account" turning white: <IMAGE>
Go to 'Settings -> Editor -> Color & Fonts -> General'. On the right in 'Errors and Warnings' find 'Unused symbol' and uncheck the 'Foreground' (and 'Effects' if you don't want the unused variables to be underlined). Note: if you are using one of the default Color Schemes, you will have to copy it to be able to edit it. Just press a 'Save As...' button on the top of the same section. <URL> this will also affect unused parameters, functions, classes and private member declarations. But after checking <URL> it seems like that is what you want.
13,619,179
1
13,619,237
iOS has the ability to allow the user to rearrange/reorder elements in a list. This is done by going into Edit mode and dragging the elements to the required location. A good example of this is the Edit mode in the Notifications screen in the Settings app. <IMAGE> Does there exist this kind of functionality in Android by default? Is it possible to enable this functionality within ListView or LinearLayout? If this doesn't exist in the base Android functionality is there a library that does a similar thing? I know of the drag and drop functionality, but this is most likely too low level as far as I can tell. <URL>
There are some third party libraries available in android <URL> <URL>
9,218,376
1
9,221,763
Here is my Master Entity who will contains a list of Language ''' public partial class WebSite { public WebSite() { this.WebSiteLanguages = new HashSet<WebSiteLanguage>(); } public int Id { get; set; } public Nullable<int> WLUserID { get; set; } public string DomainName { get; set; } public Nullable<bool> IsActive { get; set; } //[Required] public virtual ICollection<WebSiteLanguage> WebSiteLanguages { get; set; } } ''' My WebSiteLanguage Child class is ''' public partial class WebSiteLanguage { public int Id { get; set; } public string LanguageName { get; set; } public Nullable<int> WebSiteID { get; set; } public bool IsDefault { get; set; } public virtual WebSite WebSite { get; set; } } ''' In my View, I can Add many language as I want within an ajax call. <IMAGE> Is it possible to make the > public virtual ICollection WebSiteLanguages { get; set; } Required. The Website Entity is not valid if there is no WebSiteLanguage created. Thanks a lot.
As per post <URL>". To validate that a navigation property is not null you can: - - - <URL> The 3rd solution seems to be the cleanest.
20,233,704
1
20,235,205
I've calculated a whole bunch of z-scores using mean and standard deviation, now I want them to be turned into percentiles. What is the way to do this in objective-c for an iPhone app? I've only done this using a z-score chart in my stats class back in highschool. I've found this equation to be the one I am trying to recreate: <IMAGE> and this thread <URL> seems to be an answer, but I still don't understand what is going on. Can anyone please explain to me how this is all working? For example, what is the erfc function? Will '0.5 * erfc(z-score * M_SQRT1_2);' work? Thanks in advance!
Alright, I've found the solutions. <IMAGE> <IMAGE> The second equation returns the percentile where x is the z-score. So '0.5 * (1 + erf(z_score*M_SQRT1_2))' is the answer to my question also, erfc(x) = 1 - erf(x)
29,838,938
1
29,839,011
I was looking around and figured out how to generate a spreadsheet using this basic <URL>. The problem is that I can't figure out how to generate a cell/entry that spans multiple rows/columns (see picture below). <IMAGE> Not quite sure where to post/ask around... any help/pointers appreciated!
You may use phpExcel library which have nice set of utility function. For your you can use function 'mergeCells()'. As like this ''' $objPHPExcel->setActiveSheetIndex(0)->mergeCells('A1:A3'); ''' For details about phpExcel <URL>
17,169,209
1
17,169,733
I am doing change color of my apple shown below: <IMAGE> to change all red colors to green and all yellow to orange. My problem is how to select all kind of red color and how to select all kind of yellow to apply new effect or color. Any help please. Thanks
The easiest way to do this is to convert the RGB colors to HSB/HSV (Hue, Saturation, Brightness/Value). The hue value is the color. For converting red to green, for instance, you'll want to figure out which numeric hue value represents red and which one represents green, then figure out a threshold. For every pixel where the hue is close to red (within your threshold), you move the hue to green.
18,075,046
1
18,075,120
I'm developing a 'Windows Form' application under Windows XP. I've created a 'Class Library' that is accessed by the user application in order to create PDF documents using PdfSharp and MigraDoc libraries. My problem starts when I try to add a bitmap to the PDF. I have the image stored in the resources, and due MigraDoc features, I firstly need to save the file on the disk in order to do that, as you can see in the next lines: ''' string logoTemp = Directory.GetCurrentDirectory().ToString() + "\imagename.png"; if (!File.Exists(logoTemp)) ((Bitmap)Properties.Resources.imagename).Save(logoTemp, ImageFormat.Png); paragraph.AddImage(logoTemp); ''' It works fine on my computer and also on a 32 bits Windows 7, but it gets throw an exception on 64 bits Windows 7, as showed in the next screenshot: <IMAGE> This error is solved if I run the application as Administrator, but that is not acceptable. Any ideas?
Put your code in a 'try { } catch() {}' block and see what exception it throws using a debugger.
36,958,659
1
36,958,848
My Code { ''' var textarea='@Html.TextAreaFor(m=>m.Content)' $('#boxPhanThuong').append(textarea); ''' } In console I had: <IMAGE> I don't know how to fix it. Html.textboxbor or dropdownlistfor is fine but Html.textareafor is not.
The output from 'Html.TextAreaFor(m=>m.Content)' given to the browser likely includes line breaks. Simple example: ''' var textarea='<textarea id="Content"> </textarea>'; ''' And, in JavaScript, string literals don't allow line breaks to be included verbatim. They have to be escaped, which Razor isn't going to do for you. --- You can however take advantage of JavaScript and JSON's similarities, along with <URL>, to output the markup so JavaScript understands it. Though, this requires additional setup: ''' var textarea=@Html.Raw(Json.Encode(Html.TextAreaFor(m => m.Content).ToHtmlString())); ''' The other additions are: - <URL>''&quot;&lt;textarea ...''<script>' For the simple example, the result of this would be: ''' var textarea="<textarea id="Content"> </textarea>"; '''
32,778,582
1
39,126,370
<IMAGE> I am testing the payment for paypal(ios sdk. 2.11.5). But as shown in the image, credit card information is not showing up. I put in the credit card information in sandbox buyer account. Why is the credit card information not showing up? I want to know.
It's related to how your account is setup. Please read the following checklist.. 1. Your account must be either Premier or Business. Personal type accounts do not have this option. 2. PayPal Account Optional (a setting in your account) is turned on - this enables non-PayPal members to pay by Credit Card. 3. The email address you use to log into your PayPal Account must be verified. 4. Credit Card linked and verified. 5. The IP address of your hosted site is not on a blocked list.
29,561,767
1
29,630,084
So, we're talking Xcode 6.2 and the year 2015 - apart from most articles on the web. I have an iOS project that contains two dependency projects that I need to debug into. I have tried various tutorials and articles from the web with no luck. How can I actually debug the code from the sub projects? In the frameworks folder of the parent project I have included compiled versions of these sub projects? Perhaps these are what are being used and Xcode ignores the actual source code. My project is setup as shown below, you can see there are two sub projects (SDK & Server connector). The compiled versions of these projects (.framework) have also been included in the main projects Frameworks folder (for successful build). Any ideas? <IMAGE>
The solution is this article: <URL> Basically, for each dependency you must create a static library target and reference that target in the dependent project under "Build Phases". Categories weren't working out of the box for me. To fix this I needed to go to the parent project that references the libraries -> Targets -> Build Settings -> Other Linker Flags = "-ObjC". You may get "file not found" errors for headers you are importing. You will need to use Angle Brackets for the headers located in the libraries e.g. ''' #import <FancyLibrary.h> ''' As well as including the path to the library in the "Header Search Path" of the parent project. i.e. Targets -> Build Settings -> Header Search Paths. (I set it to the root of the project and marked as recursive).
65,816,647
1
65,852,740
I have a pandas DataFrame that looks like the following: --- <IMAGE> --- Essentially it tracks the # of moves for each unique product id during different shifts; shifts are numbered 1 to 4, days are numeric 1-7. Every shift has only unique product id's, but when I pivoted with 'SHIFT' as the index and 'DAY' as columns, it gave me a duplicate index error. I'm having trouble pivoting it so the index is the shift number, and columns are grouped by day. essentially I want it as the following: | | | | DAY | | | | | | | | --- | | | | | | 1 | | 2 | | 3 | | | SHIFT | PRODUCT_ID | #_OF_MOVES | PRODUCT_ID | #_OF_MOVES | PRODUCT_ID | #_OF_MOVES | | 1 | | | | | | | | 2 | | | | | | | | 3 | | | | | | | Putting it in a pivot table didn't work for me, because I didn't want to apply an aggregation function to the data. I tried pivoting it normally but realized that I'd be using the 'DAY' values as columns, and I'm a little confused on if that were possible to do, and if so how I'd go about it. Thanks!
''' df=pd.DataFrame({"day":[2,2,2,1,1,1,3,3,3],"product_id":[165,177,182,210,211,213,222,285,308], "no_of_moves":[145,18,108,6,12,54,100,3613,301]}) print(df.head()) moves = df.pivot_table(index='day', values='no_of_moves', columns=['day','product_id'], aggfunc='sum') print(moves.T) '''
31,186,176
1
31,212,843
When I run my ionic app with crosswalk, and try open the camera through the getUserMedia api. I get the PermissionDenied error <IMAGE> How to allow the access to camera?
I managed to solve as follows: Simply using pure cordova, without ionic or CCA. Adding the crosswalk plugin: > cordova plugin add cordova-plugin-crosswalk-webview Repository page: <URL> And in the AndroidManifest.xml add the line: > < uses-permission android:name="android.permission.CAMERA"/> See more permissions at: <URL> The importance of the CSP rules still remain, as said. > :media-src: 'self' mediastream:
10,557,489
1
10,557,497
I am trying to layout 12 divs within another div. It seems that the margin-left is not working for them. They appear in a vertical column rather beside eachother.<IMAGE> ''' div id="wrapper"> <div id="mydiv"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> </div> ''' CSS ''' wrapper{ width:952px; height:602px; margin: 0px auto; position:relative; } #mydiv{ position:absolute; left:150px; width:600px; height:375px; border: 1px solid black; padding:10px; color:#FF0080; background-color:#FF0000; } #mydiv div{ width:180px; height:100px; background-color:#000000; margin-left:20px; margin-top:10px; } '''
You need to float the divs if you want them to appear side-by-side: > : specified class instead of style for inline styling. ''' <div style="float:left;margin-left:10px;"> Hello </div> <div style="float:left;margin-left:10px;"> World! </div> ''' Here's a <URL> to demonstrate.
6,562,532
1
6,562,900
<IMAGE> Image comments: Icon should go centered in the red bit. The text should go centered in the yellow bit. I'm trying to create a button in android that looks pretty much like the above. I tried with the imagebutton, the normal button (with drawabletop and drawablebottom), but the text is not proper aligned then. Do note that I prefer not to use shapes, as the final result will be ninepatch images (that come from photoshop). Although feel free an example there for documentation use. Also note that it needs to be clickable. I think i just need to create a custom XML for this below, and then somehow have a button make use of this. I just haven't figured out how/where i need to set the text and so on then. Any advice on this is appreciated.
hiii.... While using Button... you can align your text as per your expectations using 'android:gravity="center"'android:text="TestHere"' Try using this... In my case this works f9... It does or doesn't help you plz let me know
16,037,317
1
16,082,626
I am working on an android application.In my app i have to show a multicolour bar chart like the below. <IMAGE> I searched a lot in net but get different suggestions about libraries. At last I find the only solution is <URL> . In this page their graph chart also showing multiple colour.But there I get only java code but I failed make it as a android application. I got one android sample application using charts4j from <URL>.But its giving exception. ''' FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.googlecode.charts4j.Data ''' So please try to help me to find solution to show multicolour graph chart. Thanks in advance
I solved the exception by creating a folder named libs rather than lib. The reason for using libs is > Android's current build tools (Eclipse and command-line) expect that JARs are in a libs/ directory. It will automatically add those JARs to your compile-time build path. More importantly, it will put the contents of the JARs into your APK file, so they will be part of your run-time build path.Using lib/ and mucking with your build path manually will solve the compile-time problem, but then your JAR contents are not in your APK and therefore will not be available to you at runtime.
17,803,865
1
17,804,038
I have a little problem. I have database table with some indicators which look like: <IMAGE> I want to obtain list of RED groups and finally get the begin and the end of each group (that's the simpliest part). Do you have any idea how to do this?
You can use this extension method to create sequence groups which satisfy your predicate ''' public static IEnumerable<IEnumerable<T>> GroupBySequence<T>( this IEnumerable<T> source, Func<T, bool> predicate) { var iterator = source.GetEnumerator(); List<T> group = new List<T>(); while (iterator.MoveNext()) { if (predicate(iterator.Current)) { group.Add(iterator.Current); continue; } if (group.Any()) { yield return group; group = new List<T>(); } } if (group.Any()) yield return group; } ''' Usage: ''' int[] data = { 1, 2, 1, 2, 2, 2, 1 }; var groups = data.GroupBySequence(i => i == 2); // returns [2] and [2,2,2] '''
58,413,622
1
58,458,195
I want to be able to break on postmessage in Chrome Developer Tools, but it appears there's no such option: <IMAGE> Is it possible to conveniently break on postmessage without specifically searching the line in source code? Edit: Someone suggested the question is a duplicate of this post: <URL> The answer features Firebug extension, however, Firebug is no longer available (<URL>
If you are using the Browser's console, you can run 'debug(window.postMessage' there to make the execution stop when the next postMessage call is made.
21,401,064
1
24,246,375
I've created a news letter, but when I see it in gmail there is a white frame when I hover over an image and a "Share" button appers like so: <IMAGE> Does anyone knows how can I remove this frame and share button in gmail when creating my news letter. Here is the code that im using to create this newsletter: ''' <html> <head> <title>title</title> </head> <body style="background:#a13022;" align="center"> <table align="center"> <tr> <td><a href="#" target="_blank"><img src="myImg.gif"/></a></td> </tr> </table> </body> </html> '''
The answer here is to not use ThunderBird to send email - because thunderbird scans emails before sending them(using avast in my example) that adds borders around images. This is not heppening when using MailChimp for example.
12,745,983
1
12,746,252
Im trying to hide the navigation controller top bar from my storyboard view, because i'm actually hiding it programmatically and when Iloit's getting reescaled in execution time Here is an image so you can understand it in a better way: <IMAGE> that top bar it's not appearing in my app and I would like to hide it in the storyboard too. Any clue? Thanks in advance!
Select the Navigation Controller, and go to the settings in the right bar : <IMAGE> In the "Navigation Controler" section, uncheck "Shows Navigation Bar", and you're good to go ! Here is what you'll get : <IMAGE>
20,103,070
1
20,103,169
Is there a formula available to find the week number (which week out of 52 weeks in a year that date lies) from the date? <IMAGE>
With a date in A1,: '=WEEKNUM(A1)' will give the week number.....For example if A1 contains: 11/20/2013 the formula will return 47
18,118,843
1
18,128,019
I want to add some label in my Jqgrid form in ADD mode....so is there any way to add some text which is not belong to any Control of the form <IMAGE> so what should I written for this funcnality...does it possible or not? please show me some example regarding this Thankyou
One way around the problem is to use your own editing form, instead of the one built into jqGrid. You will have full control over the form content, but at the price of having to write the code specifically for your application. --- Alternatively, you can specify <URL> for any column which can add text or HTML content before or after a field, as well as other options. For example: ''' colModel: [ ... {name:'price', ..., formoptions:{elmprefix:'(*)', rowpos:1, colpos:2....}, editable:true }, ... ] ''' The options you may be most interested in are: - - Although these options are specified for each column, you might be able to make some creative use of this to make it appear a label does not belong to a column. For example, by inserting HTML '<br />' elements or such.
24,205,741
1
24,205,839
How to leave a textfield that accepts tab as valid input in eclipse by using only the keyboard? See image for an exaple. <IMAGE>
Normally, 'ctrl-tab' has the same behaviour as 'tab', but it will also work when tab is accepted as valid input.
40,405,278
1
40,405,424
I'm having quite a hard time messing with UIView's properties to achieve a desired opaque look programmatically that can be easily done through Storyboard and Attributes Inspector. What I want to re-create (settings from attributes inspector): A UIView with a background color of (RGB Sliders: 0, 0, 0) and Opacity Slider set at 75%, with alpha defaulted at 1. So basically a black UIView with the opacity toned down. What I've tried programmatically: ''' 1) view.backgroundColor = .black view.alpha = 0.75 2) view.backgroundColor = UIColor.black.withAlphaComponent(0.75) view.isOpaque = true ''' Attached is a picture of the UIView selected in Storyboard with the settings for you to see. If you need any more information, please don't hesitate to let me know. Much thanks for your help. <IMAGE> UPDATE: Thanks for all your input. The combination of Clever Error's explanation of view layers and Matt's code allowed for me to achieve my desired look. <URL>
What you are describing is: ''' view.backgroundColor = UIColor.black.withAlphaComponent(0.75) view.isOpaque = false ''' The view must not be marked opaque, as it is not opaque.
11,801,456
1
11,801,498
while I got error "using System.Web.UI" as namespace not found. I tried to figure it out by adding the reference. But unfortunately in the .NET tab I couldn't find System.Web.UI component while other components were there. How to solve the issue ? <IMAGE>
EDIT: Okay, my original answer was based on the original version of the question... Next up: do you have a reference to 'System.Web.dll' which is the assembly which includes at least many of the classes in 'System.Web.UI'?
35,405,215
1
35,407,851
According to example below: Value is stored only in A1, other cells return nil. How is possible to get the A1'a value from the others merged cells, or simply check range of the A1 cell? <IMAGE>
This is not possible without first assigning the value to all the cells of the range, even in Excel VBA this is the case. See this sample ''' require 'axlsx' p = Axlsx::Package.new wb = p.workbook wb.add_worksheet(:name => "Basic Worksheet") do |sheet| sheet.add_row ["Val", nil] sheet.add_row [nil, nil] merged = sheet.merge_cells('A1:B2') p sheet.rows[0].cells[0].value # "Val" p sheet.rows[0].cells[1].value # nil sheet[*merged].each{|cell|cell.value = sheet[*merged].first.value} p sheet.rows[0].cells[0].value # "Val" p sheet.rows[0].cells[1].value # "Val" end p.serialize('./simple.xlsx') ''' Please add a sample yourself next time so that we see which gem you used, which code, error etc.
48,236,278
1
48,236,582
How to set font color, font style and background color to 'ListView.Item.Caption'? My code, as you can see on image below, is not working. <IMAGE> ''' procedure TFMainForm.ListView1CustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean); begin case SubItem of 0: begin Sender.Canvas.Brush.Color := clLime; Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Font.Style := [FsBOld]; end; 1: begin Sender.Canvas.Brush.Color := clLime; Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Font.Style := [FsBOld]; end; 2: begin Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Font.Style := [FsBOld]; end; 3: begin Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Font.Style := [FsBOld]; end; 4: begin Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Font.Style := [FsBOld]; end; end; end; '''
'OnCustomDrawSubItem()' draws only subitems. Use 'OnCustomDrawItem()' to draw the items. ''' procedure TForm24.ListView1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); begin Sender.Canvas.Brush.Color := clLime; end; procedure TForm24.ListView1CustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean); begin Sender.Canvas.Brush.Color := clYellow; end; ''' <URL>
17,998,487
1
18,014,276
I have a ClickOnce WPF application. It was installing correctly until I changed ReportViewer from Version 10 to Version 11. I know get the following error when trying to install: > The application requires that assembly Microsoft.ReportViewer.WinForms Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) First. How do I fix this and still have it using ClickOnce, I can't do a manual install as the users don't have permissions; they only have permissions to use ClickOnce. I tried changing the Microsoft.ReportViewer.WinForms.dll Publish status from to , but still the error persists. <IMAGE>
I was able to get this to work on a machine with the same problem although I needed to download two .msi applications. First I downloaded and installed SQLSysClrTypes. It is located <URL> as it is needed to install report viewer. Just click download, it'll take you onto a page with a scroll bar. SQLSysClrTypes is near the bottom. Just tick that and hit next, and you can download and install that. I got report viewer from <URL>. After installing the both of them. I was able to grab from my ClickOnce with reportviewer 11 and it downloaded and ran successfully where previously I was having the exact same problem. As an addendum, I was logged onto admin so this solution may not be the best if you don't have admin.
9,489,459
1
9,489,656
As the Instruments trace below shows, I have some regular plunges in my Physical Free Memory. At the same time the percent user load rises. Allocations remains steady, but the tabular listings show some operations have a high peak to average ratio. <IMAGE> I don't understand enough about Instruments to identify what activity is happening at the time the free memory plunges. I can look at Time Profiler in the detail pane, but this appears to be cumulative, from the beginning. I would like to see what's happening over a the narrow window of time where memory use goes up. Also, I don't understand why the tack for the Time Profiler shows no activity during these times when memory use goes up, but the Activity Monitor shows high activity. Would someone provide some guidance on how to interpret this and how to get more out of it so I can understand the memory using problem? Thanks.
- - - - You may also benefit by using Heapshot Analysis.
29,781,233
1
29,782,763
I am using symfony2 I have Manytomany entity and using multiple select box like this. in php ''' ->add('availLangs','entity',array( 'class' => 'UserBundle:Lang', 'label' => 'form.availLangs', 'multiple' => true)) ''' in twig ''' {{ form_widget(form.availLangs) }} ''' <IMAGE> It's nicely simple though,however when there are many choices(like 10~), the situation could be chaos for user. So I am trying to implement choose box like this <URL> or Some widget to select multiple items from many items easily. Is there good reference for implement with symfony2 or formbuilder?
You could use 'select2' jquery widget , it has a nice search input where you can type some characters of the desired option and the widget will get them to you. <URL> <URL> In symfony2 , just add 'select2' class to your input through builder or twig ''' ->add('availLangs','entity',array( 'class' => 'UserBundle:Lang', 'label' => 'form.availLangs', 'attr'=> array('class'=> 'select2') <-- here 'multiple' => true)) ''' then acitivate select2 with : ''' $('.select2').select2(// options maybe ) ; '''
10,236,276
1
10,236,441
I have a few UIImage's. All of them are in .png format. I need to clip another Image or UIView to the opaque part of the UIImage. Some of the images have some transparency around the outside edges. If I use the clipsToBounds it will only clip to the frame of the UIImageView not the actual image. If I make the line to be clipped the same height it will look fine in the center but I need to position the line off center to the right or left at times. Please see the photo for a better explanation. I've tried a few methods using Core Gaphics, but alas, I have not found the solution. <IMAGE>
You can try using 'CALayer''s 'mask' property. It allows you to define > An optional layer whose alpha channel is used as a mask to select between the layer's background and the result of compositing the layer's contents with its filtered background. To mask a view to a .png, set the mask layer's 'contents' to a 'CGImageRef'. Remember to import the 'QuartzCore' framework though! ;) <URL>
23,737,646
1
23,737,710
I am using Lazarus and I have a form called 'TForm1' and the unit name's Unit 1. Inside here I have a procedure called 'mergeDATfile(a:shortint);' that makes some stuff. By the way I had to create another form called 'TForm2' and inside this I have button (Button1). When it is pressed, it must call 'mergeDATfile(a:shortint);' from the 1st form. <IMAGE> How could I do it?
The obvious solution is to move the 'MergeDatFile' function into a common unit which can then be used by both form units.
26,430,359
1
26,430,893
I have the following query: ''' List<Meeting> meetings = (from m in crdb.tl_cr_Meetings join p in crdb.tl_cr_Participants on m.MeetingID equals p.MeetingID where p.TimeOut == null select new Meeting { MeetingID = m.MeetingID, MeetingName = m.MeetingName, HostUserName = m.HostUsername, BlueJeansMeetingID = m.tl_cr_BlueJeansAccount.MeetingID, StartTime = m.StartTime, Participants = (from pa in crdb.tl_cr_Participants where pa.MeetingID == m.MeetingID select pa.tl_cr_BlueJeansAccount.DisplayName).ToList() }).Distinct().ToList(); ''' And I want it to bring back a list of unique meetings. For some reason it brings back an entry for every participant, even though the data is identical: <IMAGE> Am I missing a grouping somewhere? EDIT The meeting class is currently very basic: ''' public class Meeting { public int MeetingID { get; set; } public string MeetingName { get; set; } public string HostUserName { get; set; } public DateTime StartTime { get; set; } public List<string> Participants { get; set; } public string BlueJeansMeetingID { get; set; } } '''
I believe the reason you get an entry for every participant is that you perform two joins. You need to do a groupjoin. ''' var meetings = crdb.tl_cr_Meetings.GroupJoin(crdb.tl_cr_Participants, k => k.MeetingID, k => k.MeetingID, (o,i) => new Meeting { MeetingID = o.MeetingID, MeetingName = o.MeetingName, HostUserName = o.HostUsername, BlueJeansMeetingID = o.tl_cr_BlueJeansAccount.MeetingID, StartTime = o.StartTime, Participants = i.Select(s => s.DisplayName) }).ToList(); '''
75,488,271
1
75,488,406
I have this file structure in my python project ''' |__src |__main.py |__gen.py |__app |__ __init__.py |__ app.py |__ lang.py ''' ### Intention I want to use the 'Language' class from sibling module 'lang'. So I tried with this import statement in 'app.py': ''' from app.lang import Language ''' ### Issue But when I run 'app.py' I get a ModuleNotFoundError error saying ''app' is not a package': <IMAGE> Which doesn't make sense since app has '__init__.py'. How can I solve this?
Because both 'app.py' and 'lang.py' are in the same directory try to import like this : ''' from .lang import Language ''' or you can use 'from app.lang import Language' from another file located outside app folder
28,571,830
1
28,571,974
I want to set the background color of the panel area only but it somehow also sets the background color of its controls, what's wrong with it? ''' public Form1() { InitializeComponent(); Panel p = new Panel(); p.Size = this.ClientSize; p.BackColor = Color.Black; // The button will also have black background color Button b = new Button(); b.Size = new Size(this.ClientSize.Width, 50); p.Controls.Add(b); this.Controls.Add(p); } ''' <IMAGE>
This is by design. The 'BackColor' property is an ambient property by default, meaning that it inherits its value from its parent control. When you set it explicitly to a particular value, that overrides the ambient nature and forces it to use that particular value. explicitly set the color of button like this ''' p.Controls.Add(b); b.BackColor = Color.White; this.Controls.Add(p); '''
15,095,264
1
15,095,599
I'm trying to use <URL> here, the demo works great and it looks beautiful. Problem is, whenever I try to recreate it on a Storyboard, the chart appears incredibly small and I can't seem to resize it. I've played around with all the settings and set the frame of the property and nothing seems to work. I've tried resizing it to the entire screen with: ''' [self.pieChart setFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; ''' Still the same result except the frame stretches across the screen and everything is grey. Anyone, this is how it's coming out, the grey is the frame and the XYPieChart loads in the center: <IMAGE> I'm still fairly new and I've been searching how to remedy this but I can't formulate a good enough search query that makes sense.
It looks like you haven't set the pieRadius property on the chart. If you change this it should make the pie bigger.
74,919,423
1
74,920,204
I am trying to import an image from the source file "Umma.PNG" , on the code if you hover the cursor on the link it shows the image however on the executable page its returning this error ./src/Header.js Module not found: Can't resolve 'Umma.PNG' in 'C:\Users\Zaid Mohammed\Ummanetic\ummanetic\src' <IMAGE> Can anyone help me insert the image
You cannot assign the files directly(as a static link). You need to import it like an file or library. ''' import MyImage from './where/is/image/path/umma.png' ''' And you can use it like below: ''' <img src={MyImage} alt="its an image" /> '''
21,715,881
1
21,716,489
I have a navbar in a rails app using glyphicons. I can't seem to set the spacing between the glyph and the link label unless I put a " " in front of the label. <IMAGE> Can anyone suggest a better solution. Thanks! ''' <li> <%= link_to "Maintenance", dashboards_path, :class=> "glyphicon glyphicon-wrench" %> </li> '''
If you have tag and content in a single line it produces no padding. Make sure you anchor looks something like: ''' <li> <a href="#" class="glyphicon glyphicon-wrench"> Maintenance </a> </li> ''' Or using 'link_to' ''' <li> <%= link_to dashboards_path, class: 'glyphicon glyphicon-wrench' do %> <span>Maintenance</span> <% end %> </li> ''' Though it seems strange but '<a href="#" class="glyphicon glyphicon-wrench">Maintenance</a>' produces no spaces between icon and text <URL>
21,611,634
1
21,643,140
I am a new user to memcache and ellasticache. I am using python environment for development. I have successfully created the ellacsticache cluster in aws and also created a node, therfore got two DNS, one for cluster itself and another for the node. Now I am using memcache in python from one of my instances that belongs to the same security group as the ellasticache cluster. ''' >>> import memcache >>> mc = memcache.Client(['client-facing-pi.6qkr6p.0001.apse1.cache.amazonaws.com:11211'], debug=0) >>> mc.set('hello','world') 0 ''' So, I am getting 0 as return. I even tried with the cluster dns, but that is also returning 0 in case of setting a value. What is the problem? Thank you. <IMAGE>
I got the problem As I was using VPS, I had to go to my instances, and then in the security group, I had to add cache clusters port number i.e. 11211. And now it's working fine.
26,318,312
1
26,319,289
I am using the following code at the start of a script to unhide a very hidden sheet within Excel. But I am getting an error saying I am unable to amend the visible property. (Screen shot of error message) I am basically trying to unhide the sheet & then once the sheet has been update it make it very hidden again. Any help? Thanks Al <IMAGE> ''' Sheets("UserActive").Visible = xlVisible '''
Either of the below statement should work. Please check the spelling of worksheet name. Worksheets("UserActive").Visible = -1 or Worksheets("UserActive").Visible = xlSheetVisible
29,329,999
1
30,380,721
I keep getting this error > at the bottom after I run a 'composer update' : <IMAGE> Since I am using Mac, I have tried running : 'brew search mcrypt brew install php56-mcrypt' I still get the same error message.
# Steps I solved this by running the following commands ''' brew update brew upgrade brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php54-mcrypt php --version // To Test your php sudo composer update ''' --- # Result No more Mcrypt warning !! ''' Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files Generating optimized class loader '''
27,328,994
1
27,329,542
<IMAGE> When I create a new class using the above menu ,a new java file is created for each class and as you can see this leads to a lot of .java files very quickly(Why does ellipse show a .class structure inside a .java file, ) , is this a good design practice considering the fact that sometimes I only want classes to be very small such as ''' class Name { String firstName; String lastName; } ''' I'm new to Eclipse and Java IDE's , can you also tell me a shortcut to create a new class .
It is not only good practice, it is the way Java was intended to be written. <URL> Multiple classes in the same file is possible, with <URL> and so on, but you should really have a good reason to do such a thing. There is nothing wrong with a small class, and it greatly improves readability when you are not searching through large files looking for internal classes.
71,746,437
1
71,746,624
I am looking to go from A to B on the attached image. I am new to coding and data manipulation and I can quite figure it out. - - Can this be done in 'R' or 'python'? Thanks for your help! <IMAGE> What I tried: ''' A %>% group_by('Last Name', 'First Name') %>% mutate(c2 = left_join('Course Name', 'Grade', by = c("First Name", "Last Name"))) '''
In R, we can use 'pivot_wider' from 'tidyr': ''' library(tidyverse) df %>% group_by(Last_Name, First_Name) %>% mutate(row = row_number()) %>% pivot_wider(names_from = row, values_from = c("Course", "Grade")) %>% select(Last_Name, First_Name, ends_with(as.character(1:4))) ''' ''' Last_Name First_Name Course_1 Grade_1 Course_2 Grade_2 Course_3 Grade_3 Course_4 Grade_4 <chr> <chr> <chr> <dbl> <chr> <dbl> <chr> <dbl> <chr> <dbl> 1 Doe Jane English 1 90 Math 1 80 Science 1 95 NA NA 2 Hope Pray Spanish 5 30 Latin 5 40 English 5 50 Math 5 60 ''' ''' df <- structure(list(Last_Name = c("Doe", "Doe", "Doe", "Hope", "Hope", "Hope", "Hope"), First_Name = c("Jane", "Jane", "Jane", "Pray", "Pray", "Pray", "Pray"), Course = c("English 1", "Math 1", "Science 1", "Spanish 5", "Latin 5", "English 5", "Math 5"), Grade = c(90, 80, 95, 30, 40, 50, 60)), class = "data.frame", row.names = c(NA, -7L)) '''
6,491,691
1
6,491,924
For now, i have: ''' <img style="float:right;" src="/path/to/image.png"> <p>lorem ipsum dolor</p> ''' Which nicely sets the image right and the text around it. Is it, however, possible to 'flow' text around the actual contents of an png image, ignoring the transparancy? It now looks like this: <IMAGE> I would like it to look like this: ## Possibilities i see: ''' 1) Manually add breaks ''' Almost impossible for dynamic content; ''' 2) Have php add breaks after a set number of characters ''' Very complex, and it would need to be determined for every image; ''' 3) Another way someone here knows about ''' Does anyone have any experience with situations like this? Thanks in advance!
The only conceivable way I could think of for wrapping text around images without hardcoding anything is to enlist the help of jQuery. There is a plugin called <URL> - it might be the solution that you're looking for. However, it does require HTML5 support on the browser's behalf, so it will not work for IE users as of yet.
23,033,429
1
23,033,824
I have the following dataset ''' SIZE ALG1 ALG2 ALG3 A 2 3 5 A 3 2 1 A 1 2 2 B 10 10 11 B 12 12 12 ''' I'd like a plot having as a horizontal axis the SIZE column and as Y values the series ALG1 ALG2 ALG3. E.g. <IMAGE> How can I get it wit Excel (actually OOCALC) or R? In general I get the SIZE values repeated on the x-axis, which appears then much longer. TIA
Suppose your data frame is called 'df1'. You have to convert it in a long format using 'reshape2::melt' ''' melt(df1) -> dfmelt library(ggplot2) ggplot(data=dfmelt, aes(x=SIZE, y=value)) + geom_jitter(aes(color=variable)) ''' or, more simply and quickly: ''' qplot(data=dfmelt, x=SIZE, y=value, geom="jitter", color=variable) ''' If you just want the points without "jittering" them: ''' qplot(data=dfmelt, x=SIZE, y=value, geom="point", color=variable) '''
20,802,673
1
20,836,062
I have an ASP.NET website hosted on IIS 7.5 as below: I have "customwebsite.com" as the website and in it I have two Web Applications - uk & us - so that I can access these application as customwebsite.com/uk & customwebsite.com/us. customwebsite.com directory does not have any web.config and have only two folders for web application us and uk. Both us and uk web application have their individual web.config and have Form Authentication specified as below: ''' <authentication mode="Forms"> <forms loginUrl="/static/login.aspx" name="login" timeout="20"/> </authentication> <authorization> <deny users="?" /> </authorization> ''' At this path: /static, there is a web.config with following content: ''' <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </configuration> ''' When I hit the root URL for us application, the Website loads correctly but if I loads from uk, I got the error as below: <IMAGE> I have checked the Folder Security, and all the required users have been granted permission and are same for both us and uk applications. I have checked the IIS logs and below is the response codes of the request in case of failure: 401 0 0 1519 296 Can someone help me resolving this issue.
Got it resolved. There was two more folders where the redirection of /static/login.aspx happens. We need to allow access to all such redirecting folders by having a web.config files in those folders with below content: ''' <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </configuration> '''
47,667,224
1
50,556,310
I have an Excel spreadsheet with a simple table on it. The purpose of it is to log the price of a cryptocurrency I'm watching. <IMAGE> When I'm entering new data, I make a new line, put in the time and date, write which currency it is and whether it's down or up from my last listing. I'm wanting to put an ID column in to organise each cryptocurrency in how they're listed in the top 100 currencies. In this list you have 'ARK', 'EOS', 'FunFair', 'IOTA', and 'NEM'. The order is 'IOTA', 'NEM', 'EOS', 'ARK', 'FunFair' in the list. So if I sort by Item/CC it should go by time/date, then ID, then name putting 'IOTA' at the top with a simple '1' in the column. The question is, how do I write something like: ''' =if C:C = "IOTA" B:B = "1" '''
In B2 and copied down should suit: ''' =MATCH(LEFT(C2),{"I","N","E","A","F"},0) ''' Alternatively set up a Custom List (how is off topic here) and sort ColumnC on that.
28,550,379
1
28,551,149
Ok, I've tried all 3 solutions, still not working, wondering if it is over written somewhere else, using Bootstrap 3.0. Seems so simple, yet driving me a bit bonkers. 1. :focus { -moz-outline-style: none; } 2. * { outline: none; } 3. ''' img { border:0; outline:none; } ''' None of these solutions seem to be working.<IMAGE>
in file 'bootstrap.min.cs's comment ''' a:focus { outline: thin dotted; } '''
4,936,018
1
4,954,941
How to create the multilevel vertical menu in drupal, somthing like thi screen shot<IMAGE> is there any module available for this
Nice Menus module is a nice way of achieving this without having to tamper with the theming directly. <URL>
20,625,201
1
20,625,406
in <IMAGE> picture i would like the prices to go over the other picture box which is the words "premium Roast Coffee" however it is just cutting the image on top. I have it on the top most of layer of images. thanks!
right click the PictureBox then choose bring to front or add this to your Load event picturebox1.BringToFront()
53,136,541
1
53,136,580
I am trying to access an API by only using a Web address. The documentation says: <IMAGE> Is there any way this would be achievable through the use of only the Web address? I don't need to know this, but I am just curious. I am sorry if this question is very basic; I'm just learning how to use apis.
As the text explain, this API uses an HTTP Header named 'Authorization' to receive a Bearer token. It's impossible to access it directly on browser, you will need to use curl for example to access it directly. There are a few visual tools to allow you debugging some api that you will be able to do this request, like <URL>.
19,703,557
1
19,718,686
I have the following chart done with CorePlot on the iPhone: <IMAGE> and I am trying to get the first major tick of the x-axis no to appear at the begging of the axis. Is there a way to tell the axisSet where the first major tick should be? I am trying to accomplish to have fixed times, like every 15minuter or every hour and I suppose if I get the first date value correct the next will follow.
Set the 'labelingOrigin'. The 'majorIntervalLength' defines the space between successive major tick marks, starting at the labeling origin. The origin value doesn't have to be in the visible plot range so you don't have to adjust it when scrolling the plot.
3,878,789
1
3,878,833
I just want to have a check to make sure the user picked a number in the 2x2. So if the user doesnt pick a number in one of the boxes then I want a messagebog to popup telling the user to fill in all boxes. <IMAGE>
look into validation events and controls this should start you <URL>
5,362,060
1
5,362,307
You know it is very easy to set transparent background of the control placed on the top of other control in WinForm by using the Parent method in C# like: ''' LabelText.Parent = pictureBox1; ''' But it does not work in the Windows Mobile programming. I thought there in an other way to do so. <IMAGE> I want to set the Label's background transparent, which is placed on the picturebox. In the above image the back colour of the label is already set to transparent but it displays the white colour instade of transparent.
You can get the kind of transparency you are looking for on the desktop version of .NET by overriding the Windows style flags for a control. You'd override CreateParams and turn on WS_EX_TRANSPARENT. That's however not available on CF. The simple solution is to just override the Paint event of the PictureBox and draw the text with Graphics.DrawText(). With the added benefit that this is a cheaper than a Label control.
29,442,946
1
29,444,192
I am developing a WPF application and I want the following functionality: If a user right clicks on a progress bar a small context menu should popup at the clicked position. This menu should just contain a couple of buttons which are lined up horizontally. Should I use the ContextMenu for this or are there better suitable WPF elements? I tried a ContextMenu and this is how it looks like: <IMAGE> This is the XAML: ''' <ProgressBar x:Name="PgF" Height="10" Value="{Binding Path=FileCurrentMs}" Maximum="{Binding Path=FileLengthMs}"> <ProgressBar.ContextMenu> <ContextMenu> <StackPanel Orientation="Horizontal"> <Button Content="A"/> <Button Content="B"/> <Button Content="C"/> </StackPanel> </ContextMenu> </ProgressBar.ContextMenu> </ProgressBar> ''' In the ContextMenu I have the space to the left and to the right which I don't want and I read in other posts that it is not simple just to remove this space. Any ideas?
Try like this : ''' <ProgressBar x:Name="PgF" Height="10" Value="{Binding Path=FileCurrentMs}" Maximum="{Binding Path=FileLengthMs}"> <ProgressBar.ContextMenu> <ContextMenu> <MenuItem> <MenuItem.Template> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Button Content="A" Margin="2"/> <Button Content="B" Margin="2"/> <Button Content="C" Margin="2"/> </StackPanel> </ControlTemplate> </MenuItem.Template> </MenuItem> </ContextMenu> </ProgressBar.ContextMenu> </ProgressBar> ''' You need to put all buttons in a single menu item :) good luck
30,909,930
1
31,481,851
My SDK Manager shows two platform tools, one which comes under the folder 'Tools' which has revision 22, and the other which comes under the folder 'Tools (Preview Channel)' which has revision 23rc2. When I download and install one, after rebooting the SDK Manager, the other one comes as not installed and vice-versa. <IMAGE> So if only one can be installed which one should I go for?
You can use only one version of SDK platform tool at a time. Under tools the Android SDK platform tools means those tools which have been fully developed by Google are are now stable builds. Under the preview channels are the one which are under development and are in beta stage, they are meant for advanced developers to give them an idea about the new releases and features yet to be offically released. So, you must go with sdk tools under tools unless you are ready to take in account for those extra features and for some unknown bugs.
12,776,303
1
12,776,620
<IMAGE> How to apply style and color with first half words one color and other half worlds other colors like above image
''' Spannable str = "AIRTEL"; str.setSpan(new ForegroundColorSpan(Color.RED), 0, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); str.setSpan(new ForegroundColorSpan(Color.BLACK), 3, 5, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); '''
29,044,867
1
29,046,213
I installed anaconda distro, I usualy run 'ipython notebook --pylab inline'. I updated 'ipython' using 'pip install' (windows 8.1) and I don't have to write --pylab inline to start anymore I started writing in the cell: '%matplotlib nbagg' or 'matplotlib.use['nbagg']', but when I plot something it shows this empty box: <IMAGE> I was expecting the interactive plotting box. The ipython log shows: ''' [IPKernelApp] ERROR | No such comm: 7cfe982045bb4d0db0f14deff7258130 '''
I guess this issue is caused by a too old version of 'matplotlib'. Using '%matplotlib nbagg' with 'ipython>=3.0' requires 'matplotlib>=1.4.3' (Note that '%matplotlib notebook' and '%matplotlib nbagg' are now synonyms). Updating matplotlib via 'pip install --upgrade matplotlib' will probably fix this issue. See also my <URL> on github. Thanks to for this information.
19,822,966
1
19,823,539
I am able to successfully put a link in the pdf with a friendly name: ''' Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; doc.Add(anchor); ''' <IMAGE> However, I cannot get get the anchor to work within a PdfPCell. Here is what I have tried so far: ''' var memberCell = new PdfPCell(); Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; memberCell.AddElement(new Anchor(anchor)); ''' That displays the exception: I also tried: ''' var memberCell = new PdfPCell(); Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; memberCell.AddElement(new Phrase(anchor)); ''' This does not throw an exception but it isn't a link it is just the word "Google". I am using the newest version of iTextSharp at this time v.(5.4.4.0) Any help on this would be greatly appreciated.
Instead of an 'Anchor' use a 'Chunk' and call the 'SetAnchor()' method: ''' var c = new Chunk("Google"); c.SetAnchor("https://www.google.com"); memberCell.AddElement(c); '''
24,416,781
1
24,416,986
I'm trying to delete this bar, butI can't get rid of it (it's locate just under the toolbar): <IMAGE> What is the name of that bar,how can I access it? Thank you.
If you added that tool bar you probably have a pointer to it? If yes, you can simply call: ''' removeToolBar(toolbar); ''' in your 'QMainWindow' class. Otherwise you can remove all tool bars from the main window as: ''' QList<QToolBar *> allToolBars = mainWindow->findChildren<QToolBar *>(); foreach(QToolBar *tb, allToolBars) { // This does not delete the tool bar. mainWindow->removeToolBar(tb); } '''
5,006,524
1
5,006,560
I have an image: <IMAGE> I want to use it on the background of a 'div' with 'width: 100%' and set 'repeat-x'. But I want to use only the black part, I don't want to use other images, I want to fix the image on a small piece. Is it possible?
What you're talking about is somewhat like CSS sprites, I guess. An article I used myself to learn about them is: <URL> --[Edit]-- An example of repeating backgrounds (this one's in the y-direction): <URL>
21,179,779
1
21,179,806
Why this code draws oval instead of circle at the position (75, 75) with the radius 50? ''' <canvas id=c1 style="width:400;height:400"> <script> ctx = c1.getContext('2d'); ctx.fillStyle = '#7ef'; ctx.fillRect(0, 0, 400, 400); ctx.fillStyle = '#000'; ctx.beginPath(); ctx.arc(75,75,50,0,Math.PI*2,true) ctx.stroke(); </script> ''' <IMAGE>
If you change this line: ''' <canvas id=c1 style="width:400;height:400"> ''' to: ''' <canvas id=c1 width=400 height=400></canvas> ''' it should work. Don't use CSS to set Canvas sizes as this only affects the but not the itself. For canvas you need to use it's dedicated properties (width/height) to also set the bitmap size or the bitmap is just stretched/scaled to match the size of the element. The default size of canvas if not specified is 300x150 pixels. In this case those pixels are stretched (as an image) to 400x400 which is why you get an oval instead.
14,743,426
1
14,745,208
I'm using 'Sublime Text 2' and the Color Scheme is 'iPlastic'. How can i change the followings: - - - I showed as the Screenshot below. I believe/hope i need to modify the 'iPlastic.tmTheme' file. But for those certain things above, i don't know what tags to add. Thanks! <IMAGE>
To change current tabs font color, you have to find '"class": "tab_label"' elements in your '.sublime-theme', and modify or add an '"fg"'. Something like this: ''' { "class": "tab_label", "parents": [{"class": "tab_control", "attributes": ["selected"]}], "fg": [255, 0, 0] } ''' (If you didn't set any custom theme, the default is 'Packages/Theme - Default/Default.sublime-theme'). To highlight current line, you have to set ''' "highlight_line": true ''' in your 'Settings - User'. To change the background color of , you have to add something like this: ''' <dict> <key>name</key> <string>Source base background</string> <key>scope</key> <string>text,source</string> <key>settings</key> <dict> <key>background</key> <string>#FFFFFF</string> </dict> </dict> ''' to your '.tmTheme' color scheme. Of course you should change '#FFFFFF' color to whatever you need.
9,453,780
1
9,453,943
How do I fetch just the main-content part of a webpage and display it in an UIWEBVIEW? <URL> When I look at the code of the webpage I see that the 'What is new?' posts appear below: ''' <div id="content-header" class="clearfix"> <a name="main-content" id="main-content"></a> <h1 class="title">Aktuell</h1> </div> <!-- /#content-header --> ''' Is it possible to relate to 'id="main-content' within the UIWEBVIEW to display just this part of the website instead of the whole page? Screenshot shows visually what I like to get. <IMAGE> P.S This is my code to display the whole webpage: ''' - (void)viewDidLoad { [super viewDidLoad]; NSString *golfClubURL = @"http://golfplatz-altenstadt.de"; NSURL *loungeURL = [NSURL URLWithString:golfClubURL]; NSURLRequest *myrequest = [NSURLRequest requestWithURL:loungeURL]; [self.webView loadRequest:myrequest]; self.webView.scalesPageToFit = YES; } '''
The process to make this work is to load the URL in to a string, and then modify the string, and then send the string to display in the UIWebView. It will require you to parse the html. You will probably be best off cutting out just what part you want, and adding in a header and footer. You might want to look at <URL> Do you own the website? You might want to create an alternative page of the site that shows a more mobile friendly version of the page. If it is a blog, or running something like wordpress there are plug-ins for mobile templates. This has an added benefit of giving a fast easy to read version of the site for anyone using any mobile device.
25,145,327
1
25,145,437
I want to have a photo in line with a paragraph of a text in my Android app. Like the photo below: <IMAGE> For that, I have used a SpannableString with an ImageSpan: ''' ImageSpan is = new ImageSpan(mContext, R.drawable.image); SpannableString text = new SpannableString("This is a sample text"); text.setSpan(is, 0, 10, 0); myTextView.setText(text); ''' However, the image is placed only on the first line of the paragraph. How can I achieve this layout? And please note that later I would like to download the image in the background (lazy loading in a ListView).
<URL> looks like it should have what you want, though I have not tried it.
45,652,987
1
45,653,190
I have a table, named rendeles_termekek.(In english, ordered_products) I would like to count, that each product how many times was ordered. With the SQL below, I get 4 as ennyi. I upload a picture, and I wrote the correct number to each rows. <IMAGE> ''' SELECT DISTINCT rendeles_termekek.termek_id, termek.termek_id, termek.termek_nev, ( SELECT COUNT(rendeles_termekek.termek_id) FROM rendeles_termekek ) AS ennyi FROM rendeles_termekek LEFT JOIN termek ON rendeles_termekek.termek_id = termek.termek_id ORDER BY termek.termek_nev ASC '''
''' **r1** is the alias of your table rendeles_termekek so you have to access those columns through alias name "r1" like I did in below query. try below SELECT DISTINCT r1.termek_id, termek.termek_id, termek.termek_nev, ( SELECT COUNT(r.termek_id) FROM rendeles_termekek r where r.termek_id = r1.termek_id ) AS ennyi FROM rendeles_termekek r1 LEFT JOIN termek ON r1.termek_id = termek.termek_id ORDER BY termek.termek_nev ASC '''
14,673,408
1
14,673,946
I have an 'MDI-Parent' form name 'frmMain' where I load lots of child forms in. has a Menu on the top which covers a space about say 1000*25. When child forms load, they can be born in any location of , and sometimes they go behind the menu. Is there a way to make think the space under this menu should not be used (Something like form region)? Or I should explicitly tell the child forms to be located below 'height=25'? <IMAGE> the blue portion is a menu and above it, the red portion is a panel.
I don't know if this is convenient for you, but you could add a 'Panel/FlowLayoutPanel' to your Mdi window in the desired child forms space and add the forms to the panel like this : ''' Form frm = New Form(); frm.TopLevel = False; frm.Show(); FlowLayoutPanel1.Controls.Add(frm); ''' Set the 'FlowLayoutPanel.BackColor' to 'Transparent' so it looks like an mdi container.
30,510,879
1
30,511,705
I'm making a game in C# and XNA 4.0 and I want to use a texture to show players a screenshot of each level in the level select menu. <IMAGE> Since I'm only using one texture, I need to load a new one every time that the player highlights a new option on the menu. I do so with code similar to the following: ''' Texture2D levelTexture; if(user.HighlightsNewOption) { //Notice that there is no form of unloading in this if statement string file = levelSelectMenu.OptionNumber.ToString(); levelTexture = Content.Load<Texture2D>(file); } ''' However, I fear that this current setup will cause memory usage issues. Would this problem be solved by unloading the texture first and then loading the new one? If so, how can I do this?
You can't unload a single texture. However you can unload an entire 'ContentManager' instance's contents all at once using 'ContentManager.Unload()'. The way I approached memory management in XNA is to modularize the game screens and menus into components. Each gets their own 'ContentManager' instances, unloading them when no longer needed. Using that philosophy, I wouldn't worry about the memory usage here. Give your menu its own 'ContentManager' instance. Load all of the screenshots at once when loading the content for your menu. When the menu is exited, unload it and unload its content with 'ContentManager.Unload()'. Your player's device can probably handle a few screenshots. If you've got something like 100 levels you could limit each to a small thumbnail. If you really, really need to, you can make each screenshot its own component which has its own 'ContentManager', but that is not recommended. For further reading try: <URL>
54,518,324
1
54,518,706
Is it possible to limit the types of files that can be uploaded into SSRS 2008? So far I have only been able to completely restrict file upload. We just want to limit it to certain file types. <IMAGE> Thanks!
I don't know that there's an explicit way to limit the file extensions that can be uploaded, but a solution for you may be to implement the "My Reports" feature in SSRS. With this feature, you can grant each user their own reports folder which you can then edit permissions to allow them to upload reports, but not additional resources. <URL> describes how to turn on the feature and includes a lot of useful information on the My Reports feature. This gives any administrators access to the user's folder, however each individual gets their own separate folder which makes collaboration a bit more difficult. I believe unchecking the "Manage Resources" permission in the image below would do what you need. <URL> EDIT: Sorry, looks like you have SSRS 2008. <URL> should help get MyReports working in 2008 if the above doesn't work.
41,547,767
1
41,548,022
I have been looking for several answers around the web and here, but I could not find one that solved my problem. I am making several JQuery ajax calls to the same PHP script. In a first place, I was seeing each call beeing executed only after the previous was done. I changed this by adding 'session_write_close()' to the beginning of the script, to prevent PHP from locking the session to the other ajax calls. I am not editing the $_SESSION variable in the script, only reading from it. Now the behaviour is better, but instead of having all my requests starting simultaneously, they go by block, as you can see on the image: <IMAGE> What should I do to get all my requests starting at the same moment and actually beeing executed without any link with the other requests ? For better clarity, here is my js code: ''' var promises = []; listMenu.forEach(function(menu) { var res = sendMenu(menu);//AJAX CALL promises.push(res); }); $.when.apply(null, promises).done(function() { $('#ajaxSpinner').hide(); listMenu = null; }); ''' My PHP script is just inserting/updating data, and start with: ''' <?php session_start(); session_write_close(); //execution ''' I guess I am doing things the wrong way. Thank you in advance for you precious help !! Thomas
This is probably a browser limitation, there is a maximum number of concurrent connections to a single server per browser instance. In Chrome this has been 6, which reflects the size of the blocks shown in your screenshot. Though this is from 09, I believe it's still relevant: <URL>
16,564,366
1
20,695,827
I am using ActionMailer to send an inline image. The user_mailer.rb file looks like this: ''' def welcome_mail(user, mail_content, subject) @user = user @mail_content = mail_content.html_safe attachments.inline['orglogo.png'] = File.read("#{Rails.root}/app/assets/images/orglogo.png") mail(:to => ["testuser@domain.com"],:Subject => subject) end ''' And the view contains: ''' <%= image_tag attachments['orglogo.png'].url %> ''' The image isn't appearing in the mail. This is how it appears in the mail client. I have tested on Outlook and Hotmail. <IMAGE>
Well, the solution or rather workaround that worked was to upgrade to Rails 4. I am able to send inline images without any problem in Rails 4.
30,858,712
1
30,859,764
I created a normal view controller with a customized navigation bar. Later I changed my mind to embed the view controller into a navigation controller. And I noticed that embedding the view controller into a navigation controller will create another navigation bar! As the image show: <IMAGE> I am wondering if there is a way to replace the navigation bar created by navigation controller with my own customized bar? Or, if it's not possible, is there a way to configure the new navigation bar? Because for some reason it's not shown in my interface builder.
You have 2 solutions 1. Hide the system navigationbar using below code so it was display your custom navigation. self.navController.navigationBarHidden = YES; 2. Customize the system navigation bar with its background color, back button and title text color. For this you can refer a below links which provide you detail of its http://www.appcoda.com/customize-navigation-status-bar-ios-7/
29,380,513
1
29,384,577
I'm trying to group a data frame by time and then plot the density of a variable for each subgroup. I'm doing: ''' myDf.groupby(pd.TimeGrouper('AS'))['myVar'].plot(kind='density') ''' Here's the result: ''' date 2006-01-01 Axes(0.125,0.1;0.775x0.8) 2007-01-01 Axes(0.125,0.1;0.775x0.8) 2008-01-01 Axes(0.125,0.1;0.775x0.8) 2009-01-01 Axes(0.125,0.1;0.775x0.8) 2010-01-01 Axes(0.125,0.1;0.775x0.8) Name: myVar, dtype: object ''' and the plot: <IMAGE> How do I add the correct legend to the plot? There's no way to know which line corresponds to which year right now.
set 'legend' argument to 'True': ''' myDf.groupby(pd.TimeGrouper('AS'))['myVar'].plot(kind='density', legend=True) '''
24,512,351
1
24,512,739
I need to get all company ids from a table that have both city ids (let's say 7333 and 10906) but id doesn't work the way I do it. This is my table: <IMAGE> and this is my code ''' SELECT 'company_id' as id FROM 'logistics_companies_destinations' WHERE 'city_id'= 7333 and 'city_id' = 10906 '''
You can also solve this using an 'INNER JOIN' to the table itself, joining on the same 'company_id' and requiring both city_ids to be present: ''' SELECT 'lcd1'.'company_id' AS id FROM 'logistics_companies_destinations' AS lcd1 INNER JOIN 'logistics_companies_destinations' AS lcd2 WHERE 'lcd1'.'city_id'= 7333 AND 'lcd2'.'city_id' = 10906 '''
18,848,684
1
18,865,761
I have some weird problem with Xcode since I upgraded my Xcode to 5 from 4.6. When I set the breakpoint in a file, the program actually stops at the breakpoint, but I can't see my code in the workspace. It loads some other system codes like ''' 0x2ff8: calll 0x2ffd -[ViewController viewDidLoad] + 13 at ViewController.m:28 0x2ffd: popl %eax 0x2ffe: movl 12(%ebp), %ecx 0x3001: movl 8(%ebp), %edx 0x3004: movl %edx, -12(%ebp) 0x3007: movl %ecx, -16(%ebp) 0x300a: movl 18799(%eax), %ecx 0x3010: movl 18559(%eax), %edx ''' <IMAGE> When I click the continue button it shows my code again. I have tried, - - - - None of these helped me. I have seen a lot of questions in StackOverflow which discuss "Breakpoints not working...", but for me the breakpoints are working, just not stopping in the correct position.
I found the problem, Somehow the "Show Disassembly when debugging" was enabled in my Xcode which creates that problem. When I disabled it, all my debugger stopped in my source code. You can find it under In the latest Xcode it is under
8,264,881
1
8,264,910
I'm learning clojure and have been using <URL> but it seems like maybe I haven't done it quite as the author's have anticipated - like I've perhaps missed the point somehow. <IMAGE> Given the constraint that does this seem like a reasonable solution? ''' #(.get %(- (count %) 1)) '''
That's a valid solution. I would go with '#(nth % (dec (count %)))' as being more idiomatic, but they're functionally equivalent.
9,511,159
1
9,511,417
jsFiddle: <URL> I'm trying to create a multi-column dropdown/menu widget. <IMAGE> The image on the left is in my web site, the left inside jsFiddle. Apart from the obvious colour + font, I'm not sure why jsFiddle is tampering with the alignment. This is not the issue, the issue is the first column is being hidden under the second... I've tried for hours but can't get them to display side by side.
The problem is that 'float' doesn't work on absolutely positioned elements, you can either restructure your html so as you have an absolutely positioned parent above '.first' and '.second' (as griswoldo's answer); or set a width for the dropdowns and then position them: ''' .dropdown li ul { display: none; border:black 1px solid; position:absolute; background-color:white; width: 150px; /*set the width*/ } .second { left: 150px; /*set the position*/ } ''' <URL>
17,863,919
1
17,865,696
Can a fetchedResultsController return an Array of Arrays? Or An array of NSSets? Code below is an example, of what I'm trying to do. Is it possible? ''' - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //... NSSet *objects = [_fetchedResultsController objectAtIndexPath:indexPath]; //... } ''' The reason I'm doing this, is: if the user swipes the cell, and deletes it. I need all objects from that row deleted. And I also need to display data on that Cell, from calculation made on all the clocks for that Day/Row. Here's my Core Data Model: <IMAGE> Each row must contain all Clock objects, for a given day, based on it's clockIn property. clockIn is a NSDate object. One row should represent one day. Could I get help figuring out a predicate for this? Is it even possible? Also, I'm already using sections in my Table View. So these are out of the question. There is one solution that I rather no go for, which is to create Year, Month and Day, Entities. This would fix. But it seems odd that I need to do that, considering the my clockIn property should give me everything I need.
No, it can't. As stated here: <URL> "CoreData is an object graph management framework, not a SQL data store. Thus, you should--as quickly as possible--get yourself out of the SQL mindset." And in regard to the question in hands: "NSPredicate is intended as a--no surprise--predicate for qualifying objects in the object graph. Thus you can fetch all the objects that match a query, but that is not the same as grouping those results. If you want to do aggregate operations, use Key-Value coding's collection operators. Under the hood, Core Data may convert these to sensible SQL, but that's exclusively an implementation detail."
18,026,923
1
18,027,006
I'm trying to define a background drawable in XML that will make the background have a 1dp grey border on the left. The XML I'm using is: ''' <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#00FFFFFF" /> <stroke android:width="1dp" android:color="#CCCCCC" /> <padding android:left="1dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> </shape> ''' In the screenshot below you can see that it's actually putting a 1dp border around the entire view (the "Recent Lessons" area): <IMAGE> Can someone explain to me what I've done wrong here?
I think that you may have confused padding and stroke. The 1dp stroke you are adding is the border you see around the shape - not the padding. Try following <URL>. Basically, it boils down to multiple 'drawables' as one.
71,701,477
1
71,701,607
I want to change the output from this query where the output for Debit_Credit would be 1 and 2 which is 1 for Debit, 2 for Credit. But the output will be display in one column. ''' select t_ocmp as Company, t_otyp as TransactionType, t_odoc as DocumentNo , t_leac as LedgerAcc, t_fyer as FiscalYear, t_fprd as FiscalPeriod, t_obat as Batch , t_dcdt as DocumentDate, t_bpid as BusinessPartner, t_refr as Reference , t_ccty as Tax_Country, t_cvat as Tax_Code, t_ccur as Currency , t_amnt as Amount_Foreign, t_amth_1 as Amount_Home_Currency , t_dbcr as Debit_Credit from .... where t_fprd=10 and t_fyer=2021 and t_leac=<PHONE>; ''' the output will get like this for debit_credit column <IMAGE> How to change from 1,2 output into Debit,Credit output? Thanks.
I think you can use case for the different alias for the same column ''' SELECT t_ocmp AS Company, t_otyp AS TransactionType, t_odoc AS DocumentNo , t_leac AS LedgerAcc, t_fyer AS FiscalYear, t_fprd AS FiscalPeriod , t_obat AS Batch, t_dcdt AS DocumentDate, t_bpid AS BusinessPartner , t_refr AS Reference, t_ccty AS Tax_Country, t_cvat AS Tax_Code , t_ccur AS Currency, t_amnt AS Amount_Foreign, t_amth_1 AS Amount_Home_Currency , CASE WHEN t_dbcr=1 THEN t_dbcr ELSE 0 END AS credit , CASE WHEN t_dbcr= 2 THEN t_dbcr ELSE 0 END AS debit FROM ... WHERE t_fprd = 10 AND t_fyer = 2021 AND t_leac = <PHONE>; '''
13,151,719
1
13,151,812
Somehow even the simplest ground up impress.js slide does not work for me :( <URL> ... , Always have to use your example. ''' <html lang="en"> <head> <title>Impress Demo</title> </head> <body> <div id="impress"> <div id="start"> <p style='width:1000px;font-size:80px; text-align:center'>Creating Stunning Visualizations</p> <p>Impress.js </p> </div> <div id="slide2" data-x="-1200" data-y="0"> <p style='width:1000px;font-size:80px;'> First Slide Moves From Left To Right</p> <p>Impress.js </p> </div> </div> <script type="text/javascript">impress().init();</script> <script type="text/javascript" src="js/impress.js"></script> </body> </html> ''' And I have the impress.js file under the js directory.Still none of the latest browser show the slides . I am using firefox 16. <IMAGE>
You're calling impress before loading the library, try switching the order of your script tags: ''' <script type="text/javascript" src="js/impress.js"></script> <script type="text/javascript">impress().init();</script> ''' Alternatively use a ready handler function to initialise your page scripts, like 'window.onload' or jquery's 'ready()'. For more on this see <URL>. Also, going by the <URL>, in the simplest case each step of the presentation should be an element inside the '#impress' element with a class name of 'step'.
18,991,435
1
18,991,590
Let's say I have a list of articles I want to navigate through. With iOS 6 there were two simple solutions: 1. Using UIPageViewController 2. Using a custom solution with an UIScrollView, maybe a nested one That's pretty straight forward but it lacks of flexibility regarding custom transitions. With UIPageViewController I only have two (Page Curl and Scroll), with UIScrollView there is only Scroll. The transition effect I am looking for is the one introduced by Apple with iOS 7. The one we get by pushing a new controller to the stack, see the screenshot: <IMAGE> That comes with a really nice user experience in my opinion, but it only works the way back, not forward. But as the Safari browser supports also navigating in both directions, I am wondering how it is implemented there and, eventually, how I could implement it for my list of articles. Thanks for any hints!
I looked at the exact same problem recently and built a <URL> that uses 'UIViewController' containment and a subclass of 'UIPanGestureRecognizer'. It supports: - - - 'UIScrollView' <URL> An alternative would be to build a pager based on the new 'UIViewControllerInteractiveTransitioning' and associated protocols. Hope this helps...
16,111,381
1
16,111,582
I am trying to set the background of an absolute layout that is inside a ViewFlipper. What i get is shown on this image. The blue part does not fill the entire screen, it has a white part on the right side and on the bottom. I made this white part yellow so it is more visible. <IMAGE> When I use the same code to a layout that is not inside a ViewFlipper it works fine. The XML code: ''' <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/view_flipper_id" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="6dip" > <AbsoluteLayout android:id="@+id/main_layout_id" android:layout_width="fill_parent" android:layout_height="fill_parent" > </AbsoluteLayout> <AbsoluteLayout android:id="@+id/secondary_layout_id" android:layout_width="fill_parent" android:layout_height="fill_parent" > </AbsoluteLayout> </ViewFlipper> ''' Where I change the background color: ''' @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ViewFlipper viewFlipper= (ViewFlipper)findViewById(R.id.view_flipper_id); AbsoluteLayout mainLayout=(AbsoluteLayout)viewFlipper.getChildAt(0); mainLayout.setBackgroundColor(Color.rgb(0, 0, 255)); } ''' thaks for any help in advance
You set the margin for the 'ViewFlipper' to 6dp, which means that the inner layouts will leave 6 pixels to the parent View. This means that setting the background for the inner layouts will not affect those 6 pixels. Simply remove this line: ''' android:layout_margin="6dip" '''
27,886,509
1
33,144,414
If i have 32 Gb inbuilt storage device then my app can store data of ~25 GB to its internal memory(data/data/package_name/) hidden from outside world. Assuming 6 GB for system data. Min capacity is discussed <URL>. As per my experiment on nexus 5 my app can write(Image files) till ~25 gb plus to internal memory.Insane image <IMAGE>. Just want to know the MAX data capacity,if android has one.? Does this holds good for other devices as well? or is it OEM proprietary Definition?. Root directory: data/data/com.exmaple.ui/ If the file is not <URL> then Videos/PDF files stored can be played/viewed using other apps like Photos/Adobe Using Intents. But making MODE_WORLD_READABLE they are not shown in native gallery.How do i make them show in native gallery or file explorer? if i write a file using FileOutputStream to data/data/com.exmaple.ui/myfolder**,and make the file <URL>. its not allowing me to read the file like above using intents any reason? Thanks NitZ
Adding on to Amit K. Saha answer.. 1)Any Application can store upto available device internal memory, no restriction. 2)Whichever application first reserve gets the first prioprity.First-Come-First-Served. 3)Used file provider: Copied the files to app private memory(so that the file is protected) sub-folder and use file provider to give access to the files so that ,the external app can show content. <URL>
9,377,104
1
9,377,878
A PLC documentation (Omron) shows a correct and incorrect use of Condition Flags (see image). But I do not see any difference between the two: if Instruction A is ON, then both Instruction B and the un-labeled instruction will be executed. Both ladder diagram implies achieve the same thing to me. Why one is incorrect and the other is correct? <IMAGE>
This is similar to the differential instruction problem. Again, the condition flag (CF) is global and changes each time, in this case, a comparison operation is executed. In the incorrect example, Instruction A will perform a comparison and the CF for equals (=) will be either true or false. The implied desired flow of operation is that if the instruction A returns true for equals then execute Instruction B, otherwise continue to the final rung. In the case where Instruction A returns true for equals, however, then Instruction B will execute and, in this case, it is implied that it too is performing a comparison operation (presumably to be picked up in the next rung). If B returns false for equals, however, then the final branch of the current rung will still execute because it takes place after B's comparison - this even though the intention is to only execute the final branch if A returns false - not B! The second example (correct) shows how to avoid leaking B's results into A's logic.
22,630,823
1
22,631,302
Once between the div tags, an HTML tag (eg headings, breaks), the contents are no longer align the same. Example: Html.DisplayFor (...) should end always justified. How can this be fixed? ''' <div class="table"> <div class="row"> <div class="cell"> <h3>Heading 1</h3> <hr /> <div class="row"> <div class="cell">Label 1</div> <div class="cell">Html.DisplayFor(...)</div> </div> <div class="row"> <div class="cell">Label 2 with much more Text</div> <div class="cell">Html.DisplayFor(...)</div> </div> <br /> <h3>Heading 2</h3> <hr /> <div class="row"> <div class="cell">Label 3 with Text</div> <div class="cell">Html.TextBoxFor(...)</div> </div> </div> <div class="cell"> ... </div> </div> </div> ''' CSS: ''' div .table { display: table; width: 100%; } div .cell { display: table-cell; padding: 0.3em; } div .row { display: table-row; } ''' It should actually look more like this (red line): <IMAGE>
Its because you break the flow of the layout by not adhering to only using a 'table->row/cell' structure but by injecting 'div' and 'hr' elements in the middle of it. You could simply add a width to the first column: ''' .row .cell .row .cell:first-child{ width:200px; } ''' # Demo Fiddle
66,037,001
1
66,037,132
I'm trying to extract in Google Sheets the duplicated fruits of the table depending on the date (I want to keep the newest). So I use a VLookUp but I only can extract one column. I've tried putting '{}' with column numbers between '{1;2;3;4}' but it doesn't work. Is there any way to make this with only a formula? '=ARRAYFORMULA(IFERROR(VLOOKUP(UNIQUE(A1:A6);A1:D6;1);""))' <IMAGE>
try: ''' =SORTN(SORT(A:D; 4; 1); 9^9; 2; 1; 0) '''
9,826,728
1
9,826,837
I am using the <URL> with the 'modal' option over a wordpress site. The background (overlay) is not all grey, there is a white stripe across the background. ''' $("#popup").dialog({ dialogClass: "alert", width: crmpJs.setup.social_popup_custom_content_use ? crmpJs.setup.social_popup_setup_width : 640, height: crmpJs.setup.social_popup_custom_content_use ? crmpJs.setup.social_popup_setup_height : "auto", autoOpen: true, modal: true, resizable : false, draggable : false, zIndex: 10000, closeOnEscape: crmpJs.setup.social_popup_content_locker_use == "yes" ? false : true }); ''' <IMAGE> Any idea of the reason for this malfunction?
It's your CSS. Change the repeat-x to just repeat: ''' .ui-widget-overlay { background: url("../img/overlay-bg.png") repeat-x scroll 50% 50% #000000; opacity: 0.5; } ''' to: ''' .ui-widget-overlay { background: url("../img/overlay-bg.png") repeat scroll 50% 50% #000000; opacity: 0.5; } '''
19,027,630
1
19,027,805
I want to make an activity with 2 elements in the screen, one in the bottom, with a fixed size, and one on top of this which one must fill the screen. <IMAGE> How I can do that in a Layout? Thank you
Use below code: ''' <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity" > <TextView android:id="@+id/textView1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:text="@string/hello_world" /> <TextView android:id="@+id/textView2" android:layout_width="match_parent" android:layout_height="50dp" android:gravity="center" android:text="test" /> </LinearLayout> '''
17,621,986
1
17,623,496
I'm encountering what seems to be a bug in the Visual Studio 2010 debugger. I have a simple piece of code in which a 'bool' variable initialized to 'true' is <URL> with an expression that evaluates to 'false'. Its final result should obviously be 'false', but the debugger sometimes displays it as 'true' instead. ''' static void Main(string[] args) { int x = 20; int y = 0; int z = 8; bool b = true; b &= x == y || x >= z && y >= z; } ''' <IMAGE> The issue doesn't occur consistently; for example, if I substitute the 'int' variables for their actual values in the AND-assignment, 'b' correctly shows up as 'false'. The issue doesn't manifest either if I reference the variable later (such as 'Console.WriteLine(b)'). I understand that the entire code snippet above is eligible for dead code elimination by the compiler, but I assumed that such liberties were not permitted when compiling in Debug mode and running with a debugger attached? I'm using Visual Studio 2010 Professional with SP1, targetting .NET Framework 4.0 (although I have 4.5 installed), building in Debug mode for "Any CPU" (using a 64-bit platform).
The Microsoft Bug #655793: Misreporting of variable values when debugging x64 code with the Visual Studio 2010 debugger seems related: <URL> The bug's workaround also seems to work for this problem: ''' bool b = true; b &= x == y || x >= z && y >= z; // ... bool c = b; // adding intermediate initialization of c fixes b as well. ''' One question would be whether this problem exists in VS 2012, since bug #655793 is marked fixed there.
12,318,120
1
12,318,578
I would like to add a table of the coordinates of highlighted site in a ggplot. Using a previous <URL> as example data: ''' set.seed(1) mydata <- data.frame(a=1:50, b=rnorm(50)) ggplot(mydata,aes(x=a,y=b)) + geom_point(colour="blue") + geom_point(data=mydata[10:13, ], aes(x=a, y=b), colour="red", size=5) ''' <IMAGE> I would like to add the following table to the lower right-hand corner of the plot within the plotting region. Any advice? ''' table<-cbind(sites=c("site 1","site 2","site 3","site 4"),mydata[10:13,]) table sites a b site 1 10 -<PHONE> site 2 11 <PHONE> site 3 12 <PHONE> site 4 13 -<PHONE> '''
You can use 'ggplot2''s 'annotation_custom' with a 'tableGrob' from the 'gridExtra' package. ''' library(ggplot2) library(gridExtra) set.seed(1) mydata <- data.frame(a=1:50, b=rnorm(50)) mytable <- cbind(sites=c("site 1","site 2","site 3","site 4"),mydata[10:13,]) k <- ggplot(mydata,aes(x=a,y=b)) + geom_point(colour="blue") + geom_point(data=mydata[10:13, ], aes(x=a, y=b), colour="red", size=5) + annotation_custom(tableGrob(mytable), xmin=35, xmax=50, ymin=-2.5, ymax=-1) ''' <IMAGE>