pid
int64 2.28k
41.1M
| label
int64 0
1
| text
stringlengths 1
28.3k
|
---|---|---|
29,221,458 | 0 | <p>In the first line in question regex: </p> <pre><code>"\\\\server1\\Cold Folder1\\(title and text number.*\\.pdf)" </code></pre> <p>error is in <code>\\Cold</code> and <code>\\(title</code> - it should have double slash <code>\\\\Cold</code> and <code>\\\\(title</code></p> <p>In the second line in question regex:</p> <pre><code> @"\\server1\Cold Folder1\(title and text number.*\.pdf)" </code></pre> <p>there are two errors: </p> <ul> <li><code>\Cold</code> should have double slash to represent slash: <code>\\Cold</code> </li> <li><code>\(title</code> mean <code>(</code>, should be <code>\\(title</code> to represent <code>\</code> and <code>StartGroup</code></li> </ul> <hr> <p>Working code:</p> <pre><code>Match m = Regex.Match("\\\\server1\\Cold Folder1\\title and text number06220-03-15-2015.pdf", @"\\\\server1\\Cold Folder1\\(title and text number.*\.pdf)"); Console.WriteLine("{0} produces the filename: {1}.", m.Groups[0].Value, m.Groups[1].Value); </code></pre> |
31,172,911 | 0 | <p>When a reference to a cell is made via a <code>UITableView</code>, (usually by iOS, when loading your view), iOS calls the methods in its lifecycle - e.g., <code>heightForRowAtIndexPath</code>, <code>editingStyleForRowAtIndexPath</code> to work out how to display it etc.</p> <p>So your source of an infinite loop is that you make a reference to a cell, inside a method that is called when a reference to a cell is made ;)</p> <p>To fix this, you should reference back to your data source, instead of asking the cell directly about itself. If you have a class set up as a data collection, this is easy.</p> |
22,065,349 | 0 | <p>Your framework might have a default helper function which uses php's rawurlencode() function by default too. You might want to check the parameters you should pass for $this->html->link() since php's rawurlencode() function accepts only a string as a parameter.</p> |
11,451,335 | 0 | <p>I assume you have been using Eclipse IDE. </p> <p>In your package explorer (usually on the left side), find your Java Project you wish to export, right click in it and choose <code>Export</code> from the menu. </p> <p>When asked for type, expand the <code>Java</code> folder icon and choose <code>Runnable JAR file</code>. </p> <p>Under <code>Launch configuration</code>, find and select your class that will run it (the one with <code>main</code> method).<br> Choose where you want to export it and what you want to do with the other, non-standard libraries you are using. </p> <p>Click on <code>Finish</code>. </p> |
31,350,180 | 0 | <p>Given that the site you linked to adds the ID to the body based on the page that you are on, your css is fine (although, you have a trailing comma before the open bracket that should be removed); it's the hex code on your background color that is invalid. You have 7 characters when there should only be 6: #FFD3CEf</p> <p>Generally speaking, the best way to handle special styles on the active page link is just to add a class (ex. "active") to the link that corresponds with the current page you are on, and then apply the special styles to that .active class in your css.</p> |
28,188,468 | 0 | <p>Just convert it to the right format using <code>SDL_ConvertSurfaceFormat()</code>...</p> <pre><code>SDL_Surface *image = ...; SDL_Surface *converted = SDL_ConvertSurfaceFormat( image, SDL_PIXELFORMAT_ARGB8888, 0); </code></pre> |
9,629,264 | 0 | Where are the option strings for an MFC Combo Box stored? <p>Given a resource file, containing a combo box definition, for a C++ MFC program, is there a way to programmatically obtain the option strings? </p> <p>When defining a dialog in the Visual Studio resource editor, one can specify the options with a <code>;</code>-delimited string. Where are these strings then stored? I understand as well that one can programmatically add strings to the dialog box during dialog init, obtaining them is another story. </p> <p>Nevertheless, my problem is that I don't have access to the dialog object, neither is it visible at the time I wish to obtain the option strings. Is that even possible?</p> |
25,993,860 | 0 | <p>I used this simple html style of doing it. Works fine on ios7 and cordova 3.5 and android 4.4</p> <pre><code><a href="mailto:[email protected]" data-rel='external'> </code></pre> <p>I'm not even using any plugins such as inappbrowser, just in case you have that doubt.</p> |
14,421,589 | 0 | <p>You can use String array for holding three string</p> <pre><code>String names[]= {"com.example.adapters.Music","com.example.adapters.Video","com.example.adapters.Photo"}; </code></pre> |
26,047,694 | 0 | Detecting and intercepting video playback in UIWebView <p>I would like to intercept a click in an UIWebView and then use the URL of the video. How is this possible? I found a somewhat similar post which pointed met to the </p> <pre><code>webView:shouldStartLoadWithRequest:navigationType: </code></pre> <p>delegate. I cant seem to get the loaded url of the video with this delegate.</p> <p>I am trying to get the code working in iOS8</p> |
14,399,617 | 0 | <p>For accounting timezone and daylight saving time changes, the <code>datetime.datetime</code> object needs to be timezone aware, i.e. <code>tzinfo</code> property should not be <code>None</code>. This can be done by subclassing the <code>tzinfo</code> abstract class. The <code>ustimezone</code> module does exactly that.</p> <pre><code>>>> import ustimezone >>> from datetime import datetime, tzinfo, timedelta >>> yesterday = datetime.now() - timedelta(days=1) >>> yesterday datetime.datetime(2013, 1, 17, 18, 24, 22, 106445) >>> yesterday_aware = yesterday.replace(tzinfo=ustimezone.Eastern) >>> yesterday.strftime('%Z/%Y/%m/%d') 'EST/2013/01/17' # Will show EDT/EST depending on dst being present or not. </code></pre> <p>The dst information is captured by the <code>tm_isdst</code> value of the timetuple.</p> <pre><code>>>> yesterday_aware.timetuple() time.struct_time(tm_year=2013, tm_mon=1, tm_mday=17, tm_hour=18, tm_min=24, tm_sec=22, tm_wday=3, tm_yday=17, tm_isdst=0) >>> _.tm_isdst >>> 0 # the tm_isdst flag of the time tuple can be used for checking if DST is present or not. </code></pre> <p>The <code>ustimezone</code> module here looks something like this (Borrowed from an example in Python <a href="http://docs.python.org/dev/library/datetime.html" rel="nofollow">datetime</a> reference)</p> <pre><code>from datetime import datetime, tzinfo, timedelta ZERO = timedelta(0) HOUR = timedelta(hours=1) # A complete implementation of current DST rules for major US time zones. def first_sunday_on_or_after(dt): days_to_go = 6 - dt.weekday() if days_to_go: dt += timedelta(days_to_go) return dt # US DST Rules # # This is a simplified (i.e., wrong for a few cases) set of rules for US # DST start and end times. For a complete and up-to-date set of DST rules # and timezone definitions, visit the Olson Database (or try pytz): # http://www.twinsun.com/tz/tz-link.htm # http://sourceforge.net/projects/pytz/ (might not be up-to-date) # # In the US, since 2007, DST starts at 2am (standard time) on the second # Sunday in March, which is the first Sunday on or after Mar 8. DSTSTART_2007 = datetime(1, 3, 8, 2) # and ends at 2am (DST time; 1am standard time) on the first Sunday of Nov. DSTEND_2007 = datetime(1, 11, 1, 1) # From 1987 to 2006, DST used to start at 2am (standard time) on the first # Sunday in April and to end at 2am (DST time; 1am standard time) on the last # Sunday of October, which is the first Sunday on or after Oct 25. DSTSTART_1987_2006 = datetime(1, 4, 1, 2) DSTEND_1987_2006 = datetime(1, 10, 25, 1) # From 1967 to 1986, DST used to start at 2am (standard time) on the last # Sunday in April (the one on or after April 24) and to end at 2am (DST time; # 1am standard time) on the last Sunday of October, which is the first Sunday # on or after Oct 25. DSTSTART_1967_1986 = datetime(1, 4, 24, 2) DSTEND_1967_1986 = DSTEND_1987_2006 class USTimeZone(tzinfo): def __init__(self, hours, reprname, stdname, dstname): self.stdoffset = timedelta(hours=hours) self.reprname = reprname self.stdname = stdname self.dstname = dstname def __repr__(self): return self.reprname def tzname(self, dt): if self.dst(dt): return self.dstname else: return self.stdname def utcoffset(self, dt): return self.stdoffset + self.dst(dt) def dst(self, dt): if dt is None or dt.tzinfo is None: # An exception may be sensible here, in one or both cases. # It depends on how you want to treat them. The default # fromutc() implementation (called by the default astimezone() # implementation) passes a datetime with dt.tzinfo is self. return ZERO assert dt.tzinfo is self # Find start and end times for US DST. For years before 1967, return # ZERO for no DST. if 2006 < dt.year: dststart, dstend = DSTSTART_2007, DSTEND_2007 elif 1986 < dt.year < 2007: dststart, dstend = DSTSTART_1987_2006, DSTEND_1987_2006 elif 1966 < dt.year < 1987: dststart, dstend = DSTSTART_1967_1986, DSTEND_1967_1986 else: return ZERO start = first_sunday_on_or_after(dststart.replace(year=dt.year)) end = first_sunday_on_or_after(dstend.replace(year=dt.year)) # Can't compare naive to aware objects, so strip the timezone from # dt first. if start <= dt.replace(tzinfo=None) < end: return HOUR else: return ZERO Eastern = USTimeZone(-5, "Eastern", "EST", "EDT") </code></pre> |
4,579,463 | 0 | <p>You just don't have that much control over a table's default header styles. Have your table view's delegate return a custom view for each header instead bu implementing -tableView:viewForHeaderInSection:. That view could probably be just a UILabel with the text color set to whatever you like.</p> |
7,347,297 | 0 | <pre><code>[myArray addObject:[(NSArray *)[dict objectForKey:@"Added"] objectAtIndex:0]]; </code></pre> |
24,508,139 | 0 | <h3>regarding second example</h3> <p>In the second exaple you have given</p> <pre><code>$("#div").someEvent(myFunction()); </code></pre> <p>the result of the function call is registered to execute on when the <code>someEvent</code> happens. So when the event is registered the function call happens and its result is assigned there. </p> <p>This approach can be used when <code>myFunction</code> is a function which returns a function when it is executed.</p> <p>like</p> <pre><code>var myFunction = function () { return function(){ myFunction(); } } </code></pre> <h3>regarding first example</h3> <pre><code>$("#div").someEvent(function(){ myFunction(); }); </code></pre> <p>you are registering an anonymous function and it will get executed when the <code>someEvent</code> happens. </p> <h3>putting it together</h3> <p>To explain more </p> <pre><code>var myFunctionGenerator = function() { return function(){ myFunction(); } } //case1 $("#div").someEvent(function(){ myFunction(); }); //case2 $("#div").someEvent(myFunctionGenerator()); </code></pre> <p>In above sample both the code sample will be doing the same job. Only difference will be that the case2 will leave the reference to the function generator even after the code is executed.</p> |
36,042,714 | 0 | Enterprise Library Mappings <p>Is there a way to map database fields to OOP complex type fields with Enterprise Library. I am calling stored procedures that retrieves all data that I would like to store into custom class.</p> <p>Here I retrieve data from sp:</p> <pre><code> IEnumerable<WorkHistoryGrid> data = new List<WorkHistoryGrid>(); return db.ExecuteSprocAccessor<WorkHistoryGrid>("PensionPDF_RetrieveParticipantWorkHistoryForFund", pensionId, fund); </code></pre> <p>And here is my class</p> <pre><code> public class WorkHistoryGrid : BindableBase { private string _rateType; private string _fundType; private string _employer; private string _employerName; private string _local; private string _dateBalanced; private string _plan; private string _fund; private WorkHistoryGridMergeData _mergeData; #region Properties public WorkHistoryGridMergeData MergeData { get { return _mergeData; } set { SetProperty(ref _mergeData, value); } } public string RateType { get { return _rateType; } set { SetProperty(ref _rateType, value); } } public string FundType { get { return _fundType; } set { SetProperty(ref _fundType, value); } } public string Employer { get { return _employer; } set { SetProperty(ref _employer, value); } } public string EmployerName { get { return _employerName; } set { SetProperty(ref _employerName, value); } } public string Local { get { return _local; } set { SetProperty(ref _local, value); } } public string DateBalanced { get { return _dateBalanced; } set { SetProperty(ref _dateBalanced, value); } } public string Plan { get { return _plan; } set { SetProperty(ref _plan, value); } } public string Fund { get { return _fund; } set { SetProperty(ref _fund, value); } } } } } </code></pre> <p>It works fine if I would create one class with all database fields, but I would like to have more control over it by mapping database fields to custom complex type properties.</p> |
14,964,024 | 0 | How do I symbolicate a copy/pasted crash report? <p>I have a user who is experiencing a crash using the app store version of an iPhone app. The crash is not reported via iTunes connect and the user is unable to sync with iTunes and get me the .crash file (they don't have a computer). The user is, however, able to copy and paste the crash report from the phone under "Settings > general > about > Diagnostics & usage data". </p> <p>I took this users copied crash report and manually pasted it into a text file and renamed it with the .crash extension. When I import this manually created .crash report into XCode's Organizer, I am not able to symbolicate it. I am using the same copy of XCode that generated the app store binary and the ipa is archived and I am able to symbolicate crashes that come from iTunes connect.</p> <p>Is it expected that the manually created .crash file would not symbolicate or am I doing something wrong? Any help would be much appreciated!</p> <p>Thanks!</p> <p>*<strong><em>update</em>*</strong> I am also unable to symbolicate the crash report using the steps here: <a href="http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports">Symbolicating iPhone App Crash Reports</a>.</p> <p>*<strong><em>update 2</em>*</strong> Here is the crash report:</p> <pre><code>Incident Identifier: 3A2A3D26-1E44-46AA-9777-658EBBBEDD57 CrashReporter Key: a9eadbf28904a2c3b4d285c7455db9ae06a5a555 Hardware Model: iPhone5,1 Process: MyApp [1180] Path: /var/mobile/Applications/0B09C692-7C36-4398-AC77-4217401E0FC/MyApp.app/MyApp Identifier: MyApp Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2013-02-12 18:45:15.066 -0500 OS Version: iOS 6.1 (10B143) Report Version: 104 Exception Type: 00000020 Exception Codes: 0x000000008badf00d Highlighted Thread: 0 Application Specific Information: com.company.MyApp failed to resume in time Elapsed total CPU time (seconds): 0.800 (user 0.800, system 0.000), 4% CPU Elapsed application CPU time (seconds): 0.004, 0% CPU Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x3b39ce98 0x3b39c000 + 3736 1 libdispatch.dylib 0x3b2d7c16 0x3b2d2000 + 23574 2 CoreData 0x330b9304 0x32f4d000 + 1491716 3 CoreData 0x330a75f6 0x32f4d000 + 1418742 4 CoreData 0x32f56a3e 0x32f4d000 + 39486 5 MyApp 0x000f17b8 0xef000 + 10168 6 MyApp 0x000f11b4 0xef000 + 8628 7 MyApp 0x000f2f2c 0xef000 + 16172 8 MyApp 0x0010c9c6 0xef000 + 121286 9 MyApp 0x0010cb3c 0xef000 + 121660 10 UIKit 0x3503e2f0 0x34fd4000 + 434928 11 UIKit 0x3505b0b0 0x34fd4000 + 553136 12 UIKit 0x3503e2f0 0x34fd4000 + 434928 13 UIKit 0x3505af64 0x34fd4000 + 552804 14 UIKit 0x3505aef0 0x34fd4000 + 552688 15 UIKit 0x34fe0a82 0x34fd4000 + 51842 16 CoreFoundation 0x3319d93e 0x33106000 + 620862 17 CoreFoundation 0x3319bc34 0x33106000 + 613428 18 CoreFoundation 0x3319bf8e 0x33106000 + 614286 19 CoreFoundation 0x3310f238 0x33106000 + 37432 20 CoreFoundation 0x3310f0c4 0x33106000 + 37060 21 GraphicsServices 0x36ced336 0x36ce8000 + 21302 22 UIKit 0x3502b2b4 0x34fd4000 + 357044 23 MyApp 0x000f0d16 0xef000 + 7446 24 MyApp 0x000f0ccc 0xef000 + 7372 Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x3b39d5d0 0x3b39c000 + 5584 1 libdispatch.dylib 0x3b2d8d22 0x3b2d2000 + 27938 2 libdispatch.dylib 0x3b2d4374 0x3b2d2000 + 9076 Thread 2 name: WebThread Thread 2: 0 libsystem_kernel.dylib 0x3b39ce30 0x3b39c000 + 3632 1 libsystem_kernel.dylib 0x3b39cfd0 0x3b39c000 + 4048 2 CoreFoundation 0x3319d2b6 0x33106000 + 619190 3 CoreFoundation 0x3319c02c 0x33106000 + 614444 4 CoreFoundation 0x3310f238 0x33106000 + 37432 5 CoreFoundation 0x3310f0c4 0x33106000 + 37060 6 WebCore 0x3910e390 0x39104000 + 41872 7 libsystem_c.dylib 0x3b3060de 0x3b2f5000 + 69854 8 libsystem_c.dylib 0x3b305fa4 0x3b2f5000 + 69540 Unknown thread crashed with unknown flavor: 5, state_count: 1 Binary Images: 0xef000 - 0x134fff +MyApp armv7s <1c1233075bd63f039b9f71f66cc1b1d3> /var/mobile/Applications/0B09C692-7C36-4398-AC77-A4217401E0FC/MyApp.app/MyApp 0x2fe7f000 - 0x2fe9ffff dyld armv7s <44ac9ef7642f3ba7943f6451887d3af5> /usr/lib/dyld 0x322dd000 - 0x323c3fff AVFoundation armv7s <56f22385ccb73e31863f1fa9e0b621dd> /System/Library/Frameworks/AVFoundation.framework/AVFoundation 0x323c4000 - 0x323c4fff Accelerate armv7s <f4e8c4c464953429ab6bd3160aadd176> /System/Library/Frameworks/Accelerate.framework/Accelerate 0x323c5000 - 0x32502fff vImage armv7s <49d3cf19d0a23f4d836fc313e5fd6bab> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage 0x32503000 - 0x325effff libBLAS.dylib armv7s <584e045442be39fc847ffe1a5e4c99b2> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib 0x325f0000 - 0x328a6fff libLAPACK.dylib armv7s <30a3e7dd8c603a9d81b5e42704ba5971> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib 0x328a7000 - 0x328fffff libvDSP.dylib armv7s <936354553eb93d2dafa76ffcad65f9b7> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib 0x32900000 - 0x32912fff libvMisc.dylib armv7s <5fae8715a0403315bb1991b79677f916> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib 0x32913000 - 0x32913fff vecLib armv7s <30275ee8819331229ba21256d7b94596> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib 0x32914000 - 0x32925fff Accounts armv7s <df3255c62b0239f4995bc14ea79f106b> /System/Library/Frameworks/Accounts.framework/Accounts 0x32927000 - 0x3298bfff AddressBook armv7s <ea949de12ca93a6a96ef80d0cb4d9231> /System/Library/Frameworks/AddressBook.framework/AddressBook 0x3298c000 - 0x32a46fff AddressBookUI armv7s <b25d9a6111d53dc48d8e5e9a30c362ad> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI 0x32b93000 - 0x32e1cfff AudioToolbox armv7s <8b8ef592d59f371783933b446a3e0e67> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox 0x32e1d000 - 0x32ee2fff CFNetwork armv7s <ef41814d8641319c96cdeb1264d2d150> /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x32ee3000 - 0x32f39fff CoreAudio armv7s <19aa715b19a93a5c8563dbc706e899be> /System/Library/Frameworks/CoreAudio.framework/CoreAudio 0x32f4d000 - 0x33105fff CoreData armv7s <dee36bfc0c213492983c73d7bd83a27d> /System/Library/Frameworks/CoreData.framework/CoreData 0x33106000 - 0x33238fff CoreFoundation armv7s <bd8e6c9f94b43e3d9af96a0f03ff3011> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x33239000 - 0x33372fff CoreGraphics armv7s <ef057fe1c715314cabf133ec26fa718c> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0x33374000 - 0x333affff libCGFreetype.A.dylib armv7s <163d7f8309a6350399bbb1fef6cde32c> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib 0x33593000 - 0x335aefff libRIP.A.dylib armv7s <387d00a9ed55303b8936459a99869e07> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib 0x335af000 - 0x33664fff CoreImage armv7s <7d7cd7998a113ed9b483e7dc9f388b05> /System/Library/Frameworks/CoreImage.framework/CoreImage 0x33665000 - 0x336bdfff CoreLocation armv7s <94c4fa04ba3c3f5e9d17d75074985ce9> /System/Library/Frameworks/CoreLocation.framework/CoreLocation 0x336f2000 - 0x33757fff CoreMedia armv7s <526b25ed6f4e31b790553bd80d46fec7> /System/Library/Frameworks/CoreMedia.framework/CoreMedia 0x33758000 - 0x337e0fff CoreMotion armv7s <d71e40c801423c9cbb31a188120a1c58> /System/Library/Frameworks/CoreMotion.framework/CoreMotion 0x337e1000 - 0x33837fff CoreTelephony armv7s <bdf5f32e89073773a7fdbcc87fc6b412> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony 0x33838000 - 0x3389afff CoreText armv7s <a01bc990cb483e828f7c3e08cd446daf> /System/Library/Frameworks/CoreText.framework/CoreText 0x3389b000 - 0x338aafff CoreVideo armv7s <851591a704dc344aa2fc397094b4c622> /System/Library/Frameworks/CoreVideo.framework/CoreVideo 0x338ab000 - 0x3395ffff EventKit armv7s <6282cd57cf6233359489a46554a5bb15> /System/Library/Frameworks/EventKit.framework/EventKit 0x33a2f000 - 0x33bf2fff Foundation armv7s <0f73c35ada563c0bb2ce402d282faefd> /System/Library/Frameworks/Foundation.framework/Foundation 0x33dad000 - 0x33df6fff IOKit armv7s <4e5e55f27bbb35bab7af348997bfac17> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x33df7000 - 0x33fcffff ImageIO armv7s <e04300f6e6b232ce8a02139d8f18dfdc> /System/Library/Frameworks/ImageIO.framework/ImageIO 0x34049000 - 0x341e3fff MediaPlayer armv7s <3328573c20643b02806559249c749793> /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer 0x341e4000 - 0x3445efff MediaToolbox armv7s <1b36b1b41eca35989d2e822240a769cf> /System/Library/Frameworks/MediaToolbox.framework/MediaToolbox 0x3445f000 - 0x344e5fff MessageUI armv7s <2fbfe798afe130cba7360b49d0ad487c> /System/Library/Frameworks/MessageUI.framework/MessageUI 0x344e6000 - 0x3453ffff MobileCoreServices armv7s <b0d1162a8ab03529bb90e416895b568a> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices 0x3462f000 - 0x34636fff OpenGLES armv7s <c9c8f7cbfbe5397382286b878bdf143c> /System/Library/Frameworks/OpenGLES.framework/OpenGLES 0x34638000 - 0x34638fff libCVMSPluginSupport.dylib armv7s <b7d1ddfeb0db36d6af7293fa625b12be> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib 0x3463c000 - 0x3463efff libCoreVMClient.dylib armv7s <8bcac434962435a895fa0b0a3a33b7a1> /System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib 0x3463f000 - 0x34643fff libGFXShared.dylib armv7s <272a9de67f6632c3aebbe2407cfe716b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib 0x34644000 - 0x34683fff libGLImage.dylib armv7s <3a444257935236fab123e46e617c7a8d> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib 0x34d83000 - 0x34e97fff QuartzCore armv7s <b28fd354be3c38a2965e6368fa35e0c7> /System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x34e98000 - 0x34ee4fff QuickLook armv7s <2350b507fe1b3a1a94d2824e34649b36> /System/Library/Frameworks/QuickLook.framework/QuickLook 0x34ee5000 - 0x34f13fff Security armv7s <e1fcc8913eba360c868f51558a01cf24> /System/Library/Frameworks/Security.framework/Security 0x34f92000 - 0x34fd1fff SystemConfiguration armv7s <0fb8d4a2fa8f30ce837e068a046e466b> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration 0x34fd4000 - 0x35527fff UIKit armv7s <62bee9294ca13738bd7ff14365dc8561> /System/Library/Frameworks/UIKit.framework/UIKit 0x35528000 - 0x35567fff VideoToolbox armv7s <57487f6e3c38304ab0aa14dd16043f5c> /System/Library/Frameworks/VideoToolbox.framework/VideoToolbox 0x357fd000 - 0x35809fff AccountSettings armv7s <c4b7436e8ea33ffd9805905f262e4479> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings 0x35850000 - 0x35853fff ActorKit armv7s <3aa66a29d9343626baa9d63d1a6efc14> /System/Library/PrivateFrameworks/ActorKit.framework/ActorKit 0x35855000 - 0x35858fff AggregateDictionary armv7s <6916a617625e3800bbb75a34294f4d13> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary 0x35941000 - 0x35954fff AirTraffic armv7s <e2261ffe1d803bc6bbed23191c848bad> /System/Library/PrivateFrameworks/AirTraffic.framework/AirTraffic 0x35c84000 - 0x35cbffff AppSupport armv7s <7d6122cb42363dc981247c926e637a34> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport 0x35cc0000 - 0x35ce4fff AppleAccount armv7s <668e780f91163aaca1c36294d702ae50> /System/Library/PrivateFrameworks/AppleAccount.framework/AppleAccount 0x35cf1000 - 0x35cfefff ApplePushService armv7s <4638fab5719a3007beca5a798aa69e91> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService 0x35d32000 - 0x35d3bfff AssetsLibraryServices armv7s <ec78d21573a23c34b6cec05ba56928f1> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices 0x35d6a000 - 0x35d81fff BackBoardServices armv7s <36f93cef9f6830f490fe00818bcffa2e> /System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices 0x35d8b000 - 0x35daffff Bom armv7s <f35bf1c1b24a3742847383801ac37505> /System/Library/PrivateFrameworks/Bom.framework/Bom 0x35e2f000 - 0x35e36fff CaptiveNetwork armv7s <e308f6a4f4bf3749b56bd6ff4dd8b30a> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork 0x35e37000 - 0x35f01fff Celestial armv7s <a2f7438cb5163307a04d78bc2b8a86a9> /System/Library/PrivateFrameworks/Celestial.framework/Celestial 0x35f0e000 - 0x35f12fff CertUI armv7s <98e5a166bb473fa9b2840dfdad00580a> /System/Library/PrivateFrameworks/CertUI.framework/CertUI 0x35fb8000 - 0x35fd1fff ChunkingLibrary armv7s <cddc1ecde9723802ae441d20fe604c7e> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/ChunkingLibrary 0x35fe5000 - 0x35feafff CommonUtilities armv7s <eb0b7e85b57e32f38dc498c0ee97aa7e> /System/Library/PrivateFrameworks/CommonUtilities.framework/CommonUtilities 0x3606f000 - 0x3609ffff ContentIndex armv7s <7a304e48f6213864820081df620939e9> /System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex 0x36292000 - 0x362affff CoreServicesInternal armv7s <373f1c58aee834698fb2e7b18660e870> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/CoreServicesInternal 0x362b0000 - 0x362b1fff CoreSurface armv7s <55826212d8b4352b87d80f93bc9b25c6> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface 0x3631e000 - 0x36323fff CrashReporterSupport armv7s <3b190badb14f3771b353fcd829719c80> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport 0x36324000 - 0x36360fff DataAccess armv7s <7dcaa9fce0213cbead487fcd0980bd59> /System/Library/PrivateFrameworks/DataAccess.framework/DataAccess 0x364f5000 - 0x36507fff DataAccessExpress armv7s <05ed021492f2394f9d43216d8b963665> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress 0x36546000 - 0x36547fff DataMigration armv7s <5e7169ad01853bd0ba0f66648a67a010> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration 0x3654a000 - 0x36563fff DictionaryServices armv7s <27298e235f2c35938e1033517b1196a7> /System/Library/PrivateFrameworks/DictionaryServices.framework/DictionaryServices 0x3656b000 - 0x36583fff EAP8021X armv7s <bff91efbc6ba369089b699bb50191905> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X 0x36592000 - 0x36596fff FTClientServices armv7s <c158c4281a2e31d7913d9f8b0fb4417c> /System/Library/PrivateFrameworks/FTClientServices.framework/FTClientServices 0x36597000 - 0x365d5fff FTServices armv7s <71ca9253aee730eca6c4ca3210861a2c> /System/Library/PrivateFrameworks/FTServices.framework/FTServices 0x365d6000 - 0x369e9fff FaceCoreLight armv7s <432cbaeb84743441b9286532bc36c96d> /System/Library/PrivateFrameworks/FaceCoreLight.framework/FaceCoreLight 0x36be1000 - 0x36bedfff GenerationalStorage armv7s <4e1afa8de682332ba6a042a6000c636e> /System/Library/PrivateFrameworks/GenerationalStorage.framework/GenerationalStorage 0x36bee000 - 0x36ce7fff GeoServices armv7s <f2a20efae86a30cb8210550de0280ce7> /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices 0x36ce8000 - 0x36cf3fff GraphicsServices armv7s <44b33c403523309c9e930818c7fced34> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x36d62000 - 0x36dddfff HomeSharing armv7s <137c1fbc6a843d369038348255635111> /System/Library/PrivateFrameworks/HomeSharing.framework/HomeSharing 0x36dde000 - 0x36de8fff IAP armv7s <f43af100e43c3d1fac19a86cb7665c18> /System/Library/PrivateFrameworks/IAP.framework/IAP 0x36ea0000 - 0x36f18fff IMCore armv7s <a212f1303a4f3d47aaf21078f172e4bf> /System/Library/PrivateFrameworks/IMCore.framework/IMCore 0x36fdf000 - 0x3702bfff IMFoundation armv7s <55151f53b10934c3a5faac54e354f3f1> /System/Library/PrivateFrameworks/IMFoundation.framework/IMFoundation 0x37032000 - 0x37033fff IOAccelerator armv7s <832913083f7f347fba1340263ff13b52> /System/Library/PrivateFrameworks/IOAccelerator.framework/IOAccelerator 0x37034000 - 0x37039fff IOMobileFramebuffer armv7s <828a36a2325738bb8f2d4b97730d253a> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer 0x3703a000 - 0x3703efff IOSurface armv7s <9925fbc4a08d3a17b72ac807cbbba8ba> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface 0x37088000 - 0x3722ffff JavaScriptCore armv7s <f7be721eee903a93a7de361e5627445e> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 0x37255000 - 0x3725ffff Librarian armv7s <24168aa764823064a5b151a56a413c8d> /System/Library/PrivateFrameworks/Librarian.framework/Librarian 0x37260000 - 0x37296fff MIME armv7s <3f8dc502266237c6809c4d33b6e359ad> /System/Library/PrivateFrameworks/MIME.framework/MIME 0x372d5000 - 0x372dffff MailServices armv7s <737ace3c1c7c3ec6923095f3beadb4b2> /System/Library/PrivateFrameworks/MailServices.framework/MailServices 0x372fb000 - 0x37353fff ManagedConfiguration armv7s <b147c2d6f0283d988099706a2a404280> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration 0x37354000 - 0x37359fff Marco armv7s <53ab26b3197135a781d55819fd80f032> /System/Library/PrivateFrameworks/Marco.framework/Marco 0x3736a000 - 0x373e0fff MediaControlSender armv7s <29ff7ec2b02d36ec8bf6db33c3a4ba8e> /System/Library/PrivateFrameworks/MediaControlSender.framework/MediaControlSender 0x373e1000 - 0x373eafff MediaRemote armv7s <0dc7c7c324d33af8b2f7d57f41123de9> /System/Library/PrivateFrameworks/MediaRemote.framework/MediaRemote 0x3745d000 - 0x37516fff Message armv7s <9ebc49dae1293bf8bbad64153932c756> /System/Library/PrivateFrameworks/Message.framework/Message 0x3751f000 - 0x37521fff MessageSupport armv7s <874f2566017b3931b4595c63d6f77098> /System/Library/PrivateFrameworks/MessageSupport.framework/MessageSupport 0x3752a000 - 0x37557fff MobileAsset armv7s <e3217ead58d5390395de360b3ca3a10a> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset 0x37584000 - 0x37593fff MobileDeviceLink armv7s <ed43d4db46a43db0976eeac5f3bc77a1> /System/Library/PrivateFrameworks/MobileDeviceLink.framework/MobileDeviceLink 0x3759c000 - 0x3759ffff MobileInstallation armv7s <7cbe167946123bbea56ae58208e09762> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation 0x375a0000 - 0x375a6fff MobileKeyBag armv7s <5c7d50e11eb537ae89ea12cb7ddd3935> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag 0x375df000 - 0x37602fff MobileSync armv7s <8ea08ca56ead3d77bba046811a917f79> /System/Library/PrivateFrameworks/MobileSync.framework/MobileSync 0x37603000 - 0x37606fff MobileSystemServices armv7s <5796fff2895f38e4b0f844269d4fbae5> /System/Library/PrivateFrameworks/MobileSystemServices.framework/MobileSystemServices 0x3761e000 - 0x37627fff MobileWiFi armv7s <e9ae11c07476390d9598c861658cee7d> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi 0x37641000 - 0x37785fff MusicLibrary armv7s <057b076c74fd31b590bccc9b64d7f5cb> /System/Library/PrivateFrameworks/MusicLibrary.framework/MusicLibrary 0x3779d000 - 0x377b6fff Notes armv7s <de760fe287ee3346b61c4f4e701278f3> /System/Library/PrivateFrameworks/Notes.framework/Notes 0x377b7000 - 0x377b9fff OAuth armv7s <8e91174312e43ca9ac07d91d16b32d15> /System/Library/PrivateFrameworks/OAuth.framework/OAuth 0x37ede000 - 0x37f02fff OpenCL armv7s <87637dacbb3c3e029120369438e96fcf> /System/Library/PrivateFrameworks/OpenCL.framework/OpenCL 0x38264000 - 0x38281fff PersistentConnection armv7s <c5164e016fa6340fbce9251278385105> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection 0x38517000 - 0x3853ffff PrintKit armv7s <7109f645a9ca3a4997b4172aed228723> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit 0x38540000 - 0x385b4fff ProofReader armv7s <e391e8d141c5352d978e5fde23afaaad> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader 0x385b5000 - 0x385bdfff ProtocolBuffer armv7s <edc3f72bf38c3d81954ac85f489a17e8> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer 0x386f9000 - 0x3870afff SpringBoardServices armv7s <5b94e9a529753052acde16c21e9d2566> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices 0x3876c000 - 0x38847fff StoreServices armv7s <e465f24460ff3764b4fc95ebd44b2fe3> /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices 0x38895000 - 0x38897fff TCC armv7s <95c2aa492cc03862bd7bbfae6fa62b1b> /System/Library/PrivateFrameworks/TCC.framework/TCC 0x388b6000 - 0x388c3fff TelephonyUtilities armv7s <aa759d908b903f978ab6803b7947e524> /System/Library/PrivateFrameworks/TelephonyUtilities.framework/TelephonyUtilities 0x38d48000 - 0x38de8fff UIFoundation armv7s <e3a40cee28653c4485a4918016ff2b8e> /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation 0x38de9000 - 0x38e01fff Ubiquity armv7s <99c7f2772cd63700aae2671b0b153cfe> /System/Library/PrivateFrameworks/Ubiquity.framework/Ubiquity 0x390e4000 - 0x39103fff WebBookmarks armv7s <ab55332c13da33fd825ea6204338fe19> /System/Library/PrivateFrameworks/WebBookmarks.framework/WebBookmarks 0x39104000 - 0x39a34fff WebCore armv7s <f99b83bec11b331ab69194120917a7df> /System/Library/PrivateFrameworks/WebCore.framework/WebCore 0x39a35000 - 0x39b11fff WebKit armv7s <02c32fdddbdc39b1848b721658a2fa51> /System/Library/PrivateFrameworks/WebKit.framework/WebKit 0x39bbc000 - 0x39bc3fff XPCObjects armv7s <e6846a96a21d382f9fffd6a4536c0aa7> /System/Library/PrivateFrameworks/XPCObjects.framework/XPCObjects 0x39d16000 - 0x39d51fff iCalendar armv7s <bcc081bffdae3daea0f7d7db18ed80e8> /System/Library/PrivateFrameworks/iCalendar.framework/iCalendar 0x39e67000 - 0x39e9ffff iTunesStore armv7s <10c8c7e5c9f43f75af5b30fc2389c1a2> /System/Library/PrivateFrameworks/iTunesStore.framework/iTunesStore 0x3a72d000 - 0x3a733fff libAccessibility.dylib armv7s <9111bc894a4f3ef683f5ef4d699a861b> /usr/lib/libAccessibility.dylib 0x3a734000 - 0x3a74afff libCRFSuite.dylib armv7s <770ebb2f7d9a35749e6da5d1980c244f> /usr/lib/libCRFSuite.dylib 0x3a762000 - 0x3a76efff libMobileGestalt.dylib armv7s <efddaaea8d87321a80d4a6d3f9607a80> /usr/lib/libMobileGestalt.dylib 0x3a780000 - 0x3a780fff libSystem.B.dylib armv7s <12daef214fd234158028c97c22dc5cca> /usr/lib/libSystem.B.dylib 0x3a8a2000 - 0x3a8aefff libbsm.0.dylib armv7s <0f4a8d65b05a364abca1a97e2ae72cb5> /usr/lib/libbsm.0.dylib 0x3a8af000 - 0x3a8b8fff libbz2.1.0.dylib armv7s <f54b70863d9c3751bb59253b1cb4c706> /usr/lib/libbz2.1.0.dylib 0x3a8b9000 - 0x3a904fff libc++.1.dylib armv7s <3beff5a5233b3f51ab2fc748b68e9519> /usr/lib/libc++.1.dylib 0x3a905000 - 0x3a918fff libc++abi.dylib armv7s <f47a5c7bc24c3e4fa73f11b61af635da> /usr/lib/libc++abi.dylib 0x3a949000 - 0x3aa36fff libiconv.2.dylib armv7s <81d6972465103fa3b85b4125f0ad33f1> /usr/lib/libiconv.2.dylib 0x3aa37000 - 0x3ab80fff libicucore.A.dylib armv7s <642482cfc34a3a3b97bd731258dcdc6a> /usr/lib/libicucore.A.dylib 0x3ab88000 - 0x3ab88fff liblangid.dylib armv7s <ffb53baa33ba3642a55737311f17a672> /usr/lib/liblangid.dylib 0x3ab8b000 - 0x3ab92fff liblockdown.dylib armv7s <dbd4f278c71b3f219da3e895b1f6ac80> /usr/lib/liblockdown.dylib 0x3ae73000 - 0x3ae88fff libmis.dylib armv7s <8f0712b99e8e3f5e998f0240f75bb5ba> /usr/lib/libmis.dylib 0x3aeb1000 - 0x3afaffff libobjc.A.dylib armv7s <1d499765d38c3c8fa92b363f529a02dd> /usr/lib/libobjc.A.dylib 0x3b073000 - 0x3b088fff libresolv.9.dylib armv7s <3f7be9d397d63b8e931d21bd5f49b0eb> /usr/lib/libresolv.9.dylib 0x3b0ad000 - 0x3b133fff libsqlite3.dylib armv7s <758898189dca32a5a19e5200b8952110> /usr/lib/libsqlite3.dylib 0x3b134000 - 0x3b180fff libstdc++.6.dylib armv7s <249e8ca1717b370287bb556bbd96e303> /usr/lib/libstdc++.6.dylib 0x3b181000 - 0x3b1a7fff libtidy.A.dylib armv7s <96b463f0ffa0344699fce4d48aa623bc> /usr/lib/libtidy.A.dylib 0x3b1ab000 - 0x3b258fff libxml2.2.dylib armv7s <e87724e212573773a60bc56815cec706> /usr/lib/libxml2.2.dylib 0x3b259000 - 0x3b279fff libxslt.1.dylib armv7s <c52fbe01ce7b35c799630e97e8f1318b> /usr/lib/libxslt.1.dylib 0x3b27a000 - 0x3b286fff libz.1.dylib armv7s <b64a5c1989ba3ba4aafae83d841f9496> /usr/lib/libz.1.dylib 0x3b287000 - 0x3b28afff libcache.dylib armv7s <911ce99a94623ef1ae1ea786055fd558> /usr/lib/system/libcache.dylib 0x3b28b000 - 0x3b291fff libcommonCrypto.dylib armv7s <33140a5fa3fb3e5e8c6bb19bc0e21c5c> /usr/lib/system/libcommonCrypto.dylib 0x3b292000 - 0x3b294fff libcompiler_rt.dylib armv7s <cd17f0ee3dbc38f99910d12a6056bf5a> /usr/lib/system/libcompiler_rt.dylib 0x3b295000 - 0x3b29afff libcopyfile.dylib armv7s <5e733170766430eeaa4e7784e3c7555c> /usr/lib/system/libcopyfile.dylib 0x3b29b000 - 0x3b2d1fff libcorecrypto.dylib armv7s <a15c807dcb003ad69810546a578774d9> /usr/lib/system/libcorecrypto.dylib 0x3b2d2000 - 0x3b2e2fff libdispatch.dylib armv7s <247a388103633e17b24be038eac612c0> /usr/lib/system/libdispatch.dylib 0x3b2e3000 - 0x3b2e4fff libdnsinfo.dylib armv7s <f873dd712561350096b9452bf1fc4078> /usr/lib/system/libdnsinfo.dylib 0x3b2e5000 - 0x3b2e6fff libdyld.dylib armv7s <15676e2ee1423f598907ff49fcede85b> /usr/lib/system/libdyld.dylib 0x3b2e7000 - 0x3b2e7fff libkeymgr.dylib armv7s <b0a1a911d4853feba44133e9ce499bc9> /usr/lib/system/libkeymgr.dylib 0x3b2e8000 - 0x3b2edfff liblaunch.dylib armv7s <69dd64aba1413e75967cd4ad0afa2c15> /usr/lib/system/liblaunch.dylib 0x3b2ee000 - 0x3b2f1fff libmacho.dylib armv7s <5905b311c6fb376388e56a991bb3193d> /usr/lib/system/libmacho.dylib 0x3b2f2000 - 0x3b2f3fff libremovefile.dylib armv7s <b40e964d7c563296b38625bc7082d6a8> /usr/lib/system/libremovefile.dylib 0x3b2f4000 - 0x3b2f4fff libsystem_blocks.dylib armv7s <77a9976b82b73796a0bbc9783929a1e7> /usr/lib/system/libsystem_blocks.dylib 0x3b2f5000 - 0x3b37bfff libsystem_c.dylib armv7s <11bcf1060ec63c8b909a452e6f79be08> /usr/lib/system/libsystem_c.dylib 0x3b37c000 - 0x3b382fff libsystem_dnssd.dylib armv7s <94fab309ed9b35cdbc075cdda221bc70> /usr/lib/system/libsystem_dnssd.dylib 0x3b383000 - 0x3b39bfff libsystem_info.dylib armv7s <195d8eeb7c3f31bd916c0b5611abc0e7> /usr/lib/system/libsystem_info.dylib 0x3b39c000 - 0x3b3b2fff libsystem_kernel.dylib armv7s <79bea3ebfda132baba8f5b0ad6ab95f5> /usr/lib/system/libsystem_kernel.dylib 0x3b3b3000 - 0x3b3cffff libsystem_m.dylib armv7s <faafc8292d4935c4a78233e1d0879e13> /usr/lib/system/libsystem_m.dylib 0x3b3d0000 - 0x3b3defff libsystem_network.dylib armv7s <137f48e279a83d7496659c8e3d3729d4> /usr/lib/system/libsystem_network.dylib 0x3b3df000 - 0x3b3e6fff libsystem_notify.dylib armv7s <df14146497cb3fa0a002eedbed49da65> /usr/lib/system/libsystem_notify.dylib 0x3b3e7000 - 0x3b3e8fff libsystem_sandbox.dylib armv7s <85e91e99abc03db88eddc665424090b4> /usr/lib/system/libsystem_sandbox.dylib 0x3b3e9000 - 0x3b3e9fff libunwind.dylib armv7s <3b7ec561dbec3a199f09ea08a64e76ee> /usr/lib/system/libunwind.dylib 0x3b3ea000 - 0x3b3fffff libxpc.dylib armv7s <0562a59bdf8d3f7783e93f35d7e724a8> /usr/lib/system/libxpc.dylib </code></pre> <p>*<strong><em>update 3</em>*</strong> updated with dwarfdump commands suggested below</p> <pre><code>moliveira-> dwarfdump --uuid MyApp.app/MyApp UUID: 208F2C67-493A-3DC7-AA74-AE08985CFC7C (armv7) MyApp.app/MyApp UUID: 1C123307-5BD6-3F03-9B9F-71F66CC1B1D3 (12-11) MyApp.app/MyApp [~/Desktop/symbolicate] moliveira-> dwarfdump --uuid MyApp.app.dSYM UUID: 208F2C67-493A-3DC7-AA74-AE08985CFC7C (armv7) MyApp.app.dSYM/Contents/Resources/DWARF/MyApp UUID: 1C123307-5BD6-3F03-9B9F-71F66CC1B1D3 (12-11) MyApp.app.dSYM/Contents/Resources/DWARF/MyApp </code></pre> |
17,463,397 | 0 | <p>This example also may help you to understand:</p> <pre class="lang-dart prettyprint-override"><code>void main() { var car = new CarProxy(new ProxyObjectImpl('Car')); testCar(car); var person = new PersonProxy(new ProxyObjectImpl('Person')); testPerson(person); } void testCar(Car car) { print(car.motor); } void testPerson(Person person) { print(person.age); print(person.name); } abstract class Car { String get motor; } abstract class Person { int get age; String get name; } class CarProxy implements Car { final ProxyObject _proxy; CarProxy(this._proxy); noSuchMethod(Invocation invocation) { return _proxy.handle(invocation); } } class PersonProxy implements Person { final ProxyObject _proxy; PersonProxy(this._proxy); noSuchMethod(Invocation invocation) { return _proxy.handle(invocation); } } abstract class ProxyObject { dynamic handle(Invocation invocation); } class ProxyObjectImpl implements ProxyObject { String type; int id; Map<Symbol, dynamic> properties; ProxyObjectImpl(this.type, [this.id]) { properties = ProxyManager.getProperties(type); } dynamic handle(Invocation invocation) { var memberName = invocation.memberName; if(invocation.isGetter) { if(properties.containsKey(memberName)) { return properties[memberName]; } } throw "Runtime Error: $type has no $memberName member"; } } class ProxyManager { static Map<Symbol, dynamic> getProperties(String name) { Map<Symbol, dynamic> properties = new Map<Symbol, dynamic>(); switch(name) { case 'Car': properties[new Symbol('motor')] = 'xPowerDrive2013'; break; case 'Person': properties[new Symbol('age')] = 42; properties[new Symbol('name')] = 'Bobby'; break; default: throw new StateError('Entity not found: $name'); } return properties; } } </code></pre> |
14,355,742 | 0 | <p>By checking with breakpoint it seems it is only called once. </p> |
1,227,391 | 0 | What cross-browser charting packages are available? <p>I want to include some charts on my website and I'm looking for a good cross-browser charting package - what are my options?</p> |
23,059,370 | 0 | <p>Unfortunately, that's does not change anything in me most common cases.</p> <p>Excellent response on which cases are improved : <a href="http://stackoverflow.com/questions/34488/does-limiting-a-query-to-one-record-improve-performance">Does limiting a query to one record improve performance</a></p> <p>And for your case, this article is about offest/limit performances : <a href="http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/" rel="nofollow">http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/</a></p> |
9,251,278 | 0 | <p>Not a very clear question but you can use a query like this: (<strong>untested</strong>)</p> <pre><code>insert into pageview select 15, 'A VISITOR', 10, now() from pageview a where id_realestate=10 and DATE_ADD(now(),INTERVAL -30 MINUTE) > ( select max(news_release) from pageview b where a.id_realestate=b.id_realestate ); </code></pre> |
18,659,009 | 0 | <p>The usual approach for picking off digits is to use <code>n % 10</code> to get the value of the lowest digit then <code>n /= 10</code> to remove the lowest digit. Repeat until done.</p> |
15,479,934 | 0 | <p>I figured out that I could create a new ObjectId first then when I insert it into the mongoDb, I pass the ObjectId.str for the "_id" property, then problem resolved, both mongo db level and grails level will have String type for id field.</p> <p>Code snippet is as following for mongo javascript script:</p> <pre><code>conn = new Mongo(); db = conn.getDB("dbName"); db.user.find().forEach( function(userDoc) { // Create a new object Id objectId = new ObjectId(); db.userRole.insert({ _id: objectId.str, // Before we insert, convert it as a String role: "51437d742cd1d9e80a3f0644", user: userDoc._id }); }); </code></pre> |
22,072,208 | 0 | Executing a .bat file with a parameter and reading the console output in C++ <p>I have a batch file I need to execute, it has one parameter, If I were to run this script myself I would open up cmd and write</p> <pre><code>lexparser.bat texfile.txt </code></pre> <p>and the output would then be printed to the console. I have shopped around and I have found some code which seems to be executing the file but I can't seem to extract the data being output, but I am unsure if this is correct.</p> <pre><code>QString pathDocument = qApp->applicationDirPath()+ "/stanford/lexparser.bat"; long result = (long)ShellExecute(0, 0, reinterpret_cast<const WCHAR*>(pathDocument.utf16()), 0, 0, SW_NORMAL); </code></pre> <p>I am using C++ as my language and I am also using the Qt Library to help me. I have limited programming ability so any help would be greatly appreciated</p> |
10,475,621 | 0 | <p>Your post's variables should all be concatenated.</p> <pre><code>$.post('pageprocessing.php',"replyID=" + replyID + "&tableName=" + tableName, function(response) { alert(response); }); </code></pre> <p>You could alternatively use objects</p> <pre><code>$.post('pageprocessing.php',{ replyID : replyID, tableName : tableName }, function(response) { alert(response); }); </code></pre> |
35,729,648 | 0 | <p><code>os.listdir()</code> returns a list of strings much like the terminal command <code>ls</code>. It lists the names of the files, but it does not include the name of the directory. You need to add that yourself with <code>os.path.join()</code>:</p> <pre><code>def replace(directory, oldData, newData): for file in os.listdir(directory): file = os.path.join(directory, file) f = open(file,'r') filedata = f.read() newdata = filedata.replace(oldData,newData) f = open(file, 'w') f.write(newdata) f.close() </code></pre> <p>I would not recommend <code>file</code> as a variable name, however, because it conflicts with the built-in type. Also, it is recommended to use a <code>with</code> block when dealing with files. The following is my version:</p> <pre><code>def replace(directory, oldData, newData): for filename in os.listdir(directory): filename = os.path.join(directory, filename) with open(filename) as open_file: filedata = open_file.read() newfiledata = filedata.replace(oldData, newData) with open(filename, 'w') as write_file: f.write(newfiledata) </code></pre> |
874,070 | 0 | Are there any USB stick runnable, no-install, cross platform software frameworks (with GUI)? <p>Does anyone know of a good software development framework or similar that has the following properties?</p> <ul> <li>Cross platform: it should be runnable on XP, Vista, OSX and common versions of Linux (such as Ubuntu and Kubuntu).</li> <li>No installation: Be able to run the software from a USB stick without having to copy anything to the host machine.</li> <li>Have good GUI support (this is why <a href="http://stackoverflow.com/questions/383757/ok-programming-language-from-usb-stick-with-no-installation">this question</a> doesn't give a suitable answer, as far as I can tell).</li> <li>Permissive licensing such as LGPL or BSD or such.</li> </ul> <p>Among the softer requirements are having a set of abstractions for the most common backend functionality, such as sockets, file IO, and so on (There is usually some platform specific adaptations necessary), and supporting a good language such as Python or C++, though it is usually fun to learn a new one (i.e. not perl).</p> <p>I think possible candidates are Qt 4.5 or above (but IFAIK Qt software will not run on Vista without any installation(?)), some wxWidgets or maybe wxPython solution, perhaps gtkmm. The examples I have found have failed on one or another of the requirements. This does not mean that no such examples exist, it just means that I have not found any. So I was wondering if anyone out there know of any existing solutions to this?</p> <p>Some clarifications;</p> <ul> <li>By "framework" I mean something like Qt or gtkmm or python with a widget package.</li> <li>This is about being able to run the finished product on multiple platforms, from a stick, without installation, it is not about having a portable development environment.</li> <li>It is not a boot stick.</li> <li>It is ok to have to build the software specifically for the different targets, if necessary.</li> </ul> <p>The use case I am seeing is that you have some software that you rely on (such as project planning, administration of information, analysis tools or similar) that:</p> <ul> <li>does not rely on having an internet connection being available.</li> <li>is run on different host machines where it is not really ok to install anything.</li> <li>is moved by a user via a physical medium (such as a USB stick).</li> <li>is run on different operating systems, such as Windows, Vista, Ubuntu, OSX.</li> <li>works on the same data on these different hosts (the data can be stored on the host or on the stick).</li> <li>is not really restricted in how big the bundled framework is (unless it is several gigabytes, which is not really realistic).</li> </ul> <p>It is also ok to have parallel installations on the stick as long as the software behaves the same and can work on the same data when run on the different targets. </p> <p>A different view on the use case would be that I have five newly installed machines with Vista, XP, OSX, Ubuntu and Kubuntu respectively in front of me. I would like to, without having to install anything new on the machines, be able to run the same software from a single USB stick (meeting the above GUI requirements and so on) on each of these five machines (though, if necessary from different bundles on the stick).</p> <p>Is this possible?</p> <p>Edit: I have experimented a little with a Qt app that uses some widgets and a sqlite database. It was easy to get it to work on an ubuntu dist and on osx. For windows xp and vista I had to copy QtCored4.dll, QtGuid4.dll, QtSqld4.dll and mingwm10.dll to distribution directory (this was debug code) and I copied the qsqlited4.dll to a folder named "sqldrivers" in the distribution directory.</p> |
40,229,455 | 0 | <p>It's because when you have comments you print new one. What i suggest to do is use JSON to get the comments array, pass an ID to each comment and check if the Id is allready present in the list. that way you only paste new comment, here's an example.: <br> html</p> <pre><code><form action="" method="POST" id="comment-form"> <textarea id="home_comment" name="comment" placeholder="Write a comment..." maxlength="1000" required></textarea><br> <input type="hidden" name="token" value="<?php echo Token::generate(); ?>"> <input id="comment-button" name="submit" type="submit" value="Post"> </form> <div id="comment-container"> <div id="comment-1">bla bla bla</div> </div> </code></pre> <p><br> js</p> <pre><code>function commentRetrieve(){ $.ajax({ url: "ajax-php/comment-retrieve.php", type: "get", success: function (data) { // console.log(data); if (data == "Error!") { alert("Unable to retrieve comment!"); alert(data); } else { var array = JSON.parse(data); $(array).each(function($value) { if($('#comment-container').find('#comment-' + $value.id).length == 0) { $('#comment-container').prepend($value.html); } }); } }, error: function (xhr, textStatus, errorThrown) { alert(textStatus + " | " + errorThrown); console.log("error"); //otherwise error if status code is other than 200. } }); } setInterval(commentRetrieve, 300); </code></pre> <p><br> PHP</p> <pre><code>$user = new User(); $select_comments_sql = " SELECT c. *, p.user_id, p.img FROM home_comments AS c INNER JOIN (SELECT max(id) as id, user_id FROM profile_img GROUP BY user_id) PI on PI.user_id = c.user_id INNER JOIN profile_img p on PI.user_id = p.user_id and PI.id = p.id ORDER BY c.id DESC "; if ($select_comments_stmt = $con->prepare($select_comments_sql)) { //$select_comments_stmt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $select_comments_stmt->execute(); //$select_comments_stmt->bind_result($comment_id, $comment_user_id, $comment_username, $home_comments, $comment_date, $commenter_user_id, $commenter_img); //$comment_array = array(); $rows = $select_comments_stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($rows as $row) { $comment_id = $row['id']; $comment_user_id = $row['user_id']; $comment_username = $row['username']; $home_comments = $row['comment']; $comment_date = $row['date']; $commenter_user_id = $row['user_id']; $commenter_img = $row['img']; $commenter_img = '<img class="home-comment-profile-pic" src=" '.$commenter_img.'">'; if ($home_comments === NULL) { echo 'No comments found.'; } else { $html = ""; $html .= '<div class="comment-post-box">'; $html .= $commenter_img; $html .= '<div class="comment-post-username">'.$comment_username. '</div>'; $html .= '<div>'.$comment_date. '</div>'; $html .= '<div class="comment-post-text">'.$home_comments. '</div>'; $html .= '</div>'; array('id' => $comment_id, 'html' => $html) } } } </code></pre> <p><br> For better improvement, i would suggest looking into NodeJs socket for more realtime update. Here's a few link.<br></p> <p><a href="https://nodejs.org/en/" rel="nofollow">Official NodeJs Website</a><br> <a href="http://socket.io/" rel="nofollow">Official SocketIo Website</a><br> <a href="http://socket.io/get-started/chat/" rel="nofollow">Chat tutorial with socketIo and Nodejs</a> <br> Hope it helps!</p> <ul> <li>Nic</li> </ul> |
26,543,998 | 0 | <p>I had the same issue. The arrows were displayed as in your screenshot no matter where I placed the font files. I even tried absolute links á la "src:url('d:/myProject/fonts/flexslider-icon.eot');" and it still didn't work. I think it has something to do </p> <p>with the font itself. </p> <p>But good news: I used the following workaround: </p> <p>I'm using font Arial and the two symbols "<" and ">". </p> <p>You have to adjust the file flexslider.css the following way: </p> <p>This line: </p> <pre><code>.flex-direction-nav a:before { font-family:"flexslider-icon"; font-size: 40px; line-height:1; display: inline-block; content:'\f001'; } </code></pre> <p>has to be replaced by the following one: </p> <pre><code>.flex-direction-nav a:before { font-family:"Arial"; font-size: 40px; line-height:1; display: inline-block; content:'<'; } </code></pre> <p>And this line: </p> <pre><code>.flex-direction-nav a.flex-next:before { content:'\f002'; } </code></pre> <p>has to be replaced by the following one: </p> <pre><code>.flex-direction-nav a.flex-next:before { content:'>'; } </code></pre> <p>Hope this helps. Cheers, Michael</p> |
13,219,685 | 0 | Scala cannot access object classes <p>I'm obviously missing something fundamental here. I have the following Scala Code:</p> <pre><code>package org.carlskii import java.io._ import java.security.cert.CertificateFactory import java.security.Security import org.bouncycastle.jce.provider._ object Main extends App { Security.addProvider(new BouncyCastleProvider) val provider = new BouncyCastleProvider val in = new FileInputStream("cert.cer") val certificateFactory = CertificateFactory.getInstance("X509", provider) val certificate = certificateFactory.generateCertificate(file) println(certificate.getClass) } </code></pre> <p>Which produces this:</p> <pre><code>class org.bouncycastle.jce.provider.X509CertificateObject </code></pre> <p>So I have a Bouncy Castle <code>X509CertificateObject</code> object. If I call the <code>certificate.getPublicKey</code> method it correctly returns the public key for the certificate. </p> <p>However if I call <code>certificate.getSerialNumber</code> it throws the following error:</p> <pre><code>error: value getSerialNumber is not a member of java.security.cert.Certificate println(certificate.getSerialNumber) </code></pre> <p>The interesting thing here is that Scala thinks it's a <code>java.security.cert.Certificate</code> and not an <code>org.bouncycastle.jce.provider.X509CertificateObject</code> object. Why is this the case?</p> |
22,919,157 | 0 | Why my QuickSort using ForkJoin is so slow? <p>I have a simple program uses ForkJoin to accelerate QuickSort, but I found that the sort algorithm uses standard partition method is much faster than the one uses my partition methd.</p> <p>If I don't use ForkJoin, the time performance of two partition method is almost the same. But I expect my partition method be faster.</p> <hr> <p>Edit: <strong>The compare is between standard partition() using ForkJoin and mypartition using ForkJoin</strong>, so it doesn't relate with overheads of threading.</p> <hr> <p>Edit: </p> <p>When using standard partition method and 3 threads</p> <pre><code>sorted: true total time: 3368 sorted: true total time: 1578 </code></pre> <p>When using my partition method and 3 threads</p> <pre><code>sorted: true total time: 3587 sorted: true total time: 2478 </code></pre> <p>So the results shows that ForkJoin works well for standard partition method, but not well for my partition method.</p> <hr> <pre><code>package me.shu.lang.java.forkjoin; import java.util.Arrays; import java.util.Random; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.RecursiveAction; public class FJSort extends RecursiveAction { /** * */ private static final long serialVersionUID = 6386324579247067081L; final int threshold = 32; final int[] data; final int lo; final int hi; public FJSort(int n) { this.data = new int[n]; this.lo = 0; this.hi = n; Random rand = new Random(); for(int i = 0; i < n; i++) { this.data[i] = rand.nextInt(Integer.MAX_VALUE); } } public FJSort(FJSort o) { this.data = o.data.clone(); this.lo = 0; this.hi = this.data.length; } public FJSort(int[] array, int lo, int hi) { this.data = array; this.lo = lo; this.hi = hi; } void swap(int i, int j) { int temp = data[i]; data[i] = data[j]; data[j] = temp; } int mypartition() { int v = data[hi - 1]; int i = lo; for(int j = hi - 1; j > i;) { if(data[j] <= v) { swap(i, j); i++; } else { j--; } } if(data[i] < v) { i++; } return i; } int partition() { int v = data[hi - 1]; int i = lo; for(int j = lo; j < hi - 1; ) { if(data[j] <= v) { swap(i, j); i++; } j++; } swap(i, hi - 1); return i; } public void sort() { Arrays.sort(data, lo, hi); } public boolean sorted() { for(int i = lo; i + 1 < hi; i++) { if(data[i] > data[i+1]) { return false; } } return true; } protected void compute() { if (hi - lo < threshold) sort(); else { int midpoint = mypartition(); //change to mypartition() is slow FJSort left = new FJSort(data, lo, midpoint); FJSort right = new FJSort(data, midpoint, hi); invokeAll(left, right); } } public static void main(String[] args) { long startTime; long endTime; FJSort p = new FJSort(1000 * 1000 * 30); FJSort p1 = new FJSort(p); { startTime = System.currentTimeMillis(); p.sort(); endTime = System.currentTimeMillis(); System.out.println("sorted: " + p.sorted()); System.out.println("total time: " + (endTime - startTime)); } { startTime = System.currentTimeMillis(); ForkJoinPool fjPool = new ForkJoinPool(1); fjPool.invoke(p1); endTime = System.currentTimeMillis(); System.out.println("sorted: " + p1.sorted()); System.out.println("total time: " + (endTime - startTime)); } } } </code></pre> |
9,894,203 | 0 | <p>If you have many options, you usually create a seperate table, only with an id and description (or name). To Connect these two tables, you insert a field into the CHECKLIST_ANSWER-Table, and define it as a foreign key, which references to the id (primary key) of the new table, I have mentioned first.</p> <p>Hope it is clear :)</p> |
19,190,082 | 0 | Can I store an xml string in a resources file (.resx), without it getting encoded with < and >? <p>In Visual Studio, I can put an xml string into the "Value" field. However, when I open up the actual .resx file, I see that it has been encoded to have <code>&lt;</code> and <code>&gt;</code>. I want the .resx file to be able to be edited manually without using the Visual Studio UI, and obviously this is messy with the <code>&gt;</code> and <code>&lt;</code>s. Could I somehow do this without the encoding?</p> |
29,107,557 | 0 | <p>Please <a href="http://stackoverflow.com/questions/19953382/how-to-force-page-refresh-on-browser-back-click">check this question</a> that addresses the problem using localStorage/sessionStorage.</p> |
9,610,155 | 0 | iOS - UITableView not displaying cells <p>I have the following interface set up in storyboard:</p> <p><img src="https://i.stack.imgur.com/sabsg.png" alt="enter image description here"></p> <p>The controller is a custom controller that extends from UITableViewController. When I run my app this is what I get:</p> <p><img src="https://i.stack.imgur.com/MGymS.png" alt="enter image description here"></p> <p>I thought it might have something to do with the Reuse Identifiers so I changed them to something unique for each of the cells, and modified the code accordingly, but still nothing shows up.</p> |
32,965,874 | 0 | <ol> <li>Make sure you have opened xcworkspace and NOT xcodeproj. </li> <li>I have tested your code and everything works, so problem is that Xcode can not find .framework symbols, it finds only headers</li> </ol> |
25,094,911 | 0 | <p>To be correct - to implement special member function (constructor/ copy constructor), because only in that methods can be used member initialization syntax(You have mentioned it as 1-st way). It is used for initialization of objects on creation. Second way is used for assignment of values to already created objects, which can be less efficient (especially for complex objects)</p> |
19,835,634 | 0 | Doctrine - many to one; Populating many, can't use the constant "ones" on the DB. How to insert manually the FKs? <p>I have the following model:</p> <pre><code> class Word{ ........... /** * @ManyToOne(targetEntity="Language", cascade={"persist"}) * @JoinColumn(name="language_id", referencedColumnName="id") */ protected $language; .......................... } class Language{ /** * @Id * @Column(type="integer", nullable=false) * @GeneratedValue(strategy="AUTO") */ protected $id; /** * @Column(type="string", unique=true, nullable=false) */ protected $language; ........ } </code></pre> <p>I have 3 records in the database for 3 different languages. A language is unique. </p> <p>I fail to create a new word and link it to one of the existing languages. I.e. I would like to know how to set the FK of Word to the PK of the language. And since FKs in the model don't exists as int IDs but rather object references, I am confused on how to implement it. I tried to use a Doctrine_Query::create()-> ... but I also failed with that. </p> <p>I have tried this:</p> <pre><code> $this->em = $this->doctrine->em; $w = $this->input->post('word'); $d = $this->input->post('description'); $desclan = $this->input->post('desclan'); //language is selected from a drop down //list populated from the DB $wordlan = $this->input->post('wordlan'); $word = new Entity\Word; $description = new Entity\Description; $language = new Entity\Language; $language->setLanguage($wordlan); $language->setLanguageId($lanId); // assuming that $lanId is obtained from DB $word->setWord($w); $word->setLanguage($language); $description->setDescription($d); $word->setDescrp($description); $this->em->persist($word); $this->em->flush(); </code></pre> <p>The language is chosen by a drop-down-list. This code of course spits that the language already exists in the database. How do I simply get the ID of the language and put it as a FK language_id in the 'word' table in the database, through Doctrine code?</p> <p>Thank you in advance!</p> |
4,369,017 | 0 | Background images only load sometimes <p><a href="http://eji.justgotnoobcoiled.com:8081/index.htm" rel="nofollow">http://eji.justgotnoobcoiled.com:8081/index.htm</a></p> <p>Hit refresh a few times. It happens more often in chrome.</p> <p>Any thoughts...?</p> |
39,681,282 | 0 | <p>I found a simple trick. You can pass in headers object and update its pointer value.</p> <pre><code>const headers = { Authorization: '', }; Relay.injectNetworkLayer( new Relay.DefaultNetworkLayer('http://example.com/graphql', { headers: headers, }) ); // To update the authorization, set the field. headers.Authorization = 'Basic SSdsbCBmaW5kIHNvbWV0aGluZyB0byBwdXQgaGVyZQ==' </code></pre> |
26,158,115 | 0 | <p>try it <a href="http://jsfiddle.net/cu4u5xo5/7/" rel="nofollow">DEMO</a></p> <pre><code>.inside { display:inline-block; vertical-align:top; } </code></pre> |
13,649,327 | 0 | Desire2Learn Valence API logout <p>I'm trying to implement a way to actually logout from my application that is using the Valence API. I can obviously clear the session on my end, but is there a way through the API to actually log out of the Desire2Learn site as well? I've looked through the docs and didn't see anything.</p> |
31,928,669 | 0 | Is javascriptserializer needed when passing Json data back to my view? <p>I ran a little test (bottom) to see if nested objects could be serialized and they can! So why do I see my co workers code base serialize before he returns to the view?</p> <pre><code>var js = new JavaScriptSerializer(); return Json(new { m = js.Serialize(movies), error = "none" }, JsonRequestBehavior.AllowGet); </code></pre> <p>here is my example where I don't need to serialize, why not? and what does serializing accomplish?</p> <pre><code>var movies = new List<object>(); movies.Add(new { Title = "Ghostbusters", Genre = "Comedy", Year = 1984, br = new {Man = "Tall"} }); movies.Add(new { Title = "Gone with Wind", Genre = "Drama", Year = 1939 }); movies.Add(new { Title = "Star Wars", Genre = "Science Fiction", Year = 1977 }); return Json(new { m = movies, error = "none" }, JsonRequestBehavior.AllowGet); </code></pre> |
27,985,976 | 0 | Genemu JQueryColor Field Symfony2 error ColorPicker <p>I try to use Genemu JQueryColor Field with Symfony2</p> <pre><code> <?php // ... public function buildForm(FormBuilder $builder, array $options) { $builder // ... ->add('color', 'genemu_jquerycolor') ->add('colorpicker', 'genemu_jquerycolor', array( 'widget' => 'image' )) } </code></pre> <p>It runs Exception</p> <blockquote> <p>Neither the property "colorpicker" nor one of the methods "getColorpicker()", "colorpicker()", "isColorpicker()", "hasColorpicker()", "__get()" exist and have public access in class "KALAN\NetRDVBundle\Entity\Station</p> </blockquote> <p>I try just</p> <pre><code>->add('colorpicker', 'genemu_jquerycolor', array( 'widget' => 'image' )) </code></pre> <p>No error, but just inpput text with code color</p> <p>I try </p> <pre><code>->add('color', 'genemu_jquerycolor', array( 'widget' => 'image')) </code></pre> <p>No error, the background color is ok but i can change the color.</p> <p>I try just</p> <pre><code>->add('colorpicker', 'genemu_jquerycolor', array( 'widget' => 'image')) </code></pre> <p>Or </p> <pre><code>->add('colorpicker', 'genemu_jquerycolor') </code></pre> <p>The error is the same</p> <blockquote> <p>Neither the property "colorpicker" nor one of the methods "getColorpicker()", "colorpicker()", "isColorpicker()", "hasColorpicker()", "__get()" exist and have public access in class "KALAN\NetRDVBundle\Entity\Station".</p> </blockquote> <p>Even if i can't add </p> <pre><code>{{ form_widget(form.colorpicker) }} </code></pre> |
29,698,797 | 0 | <p>You have to do following steps.</p> <ol> <li>Go to the admin and see what theme/template you are using for your store.</li> <li>Then go to app/design/frontend </li> <li>Locate your theme package</li> <li>Then locate page.xml file. It should be under app/design/frontend/themackage/default/layout This xml file shall let you know about all the different css being used in your theme.</li> <li>Identify your css file.</li> <li>Then go to skin/front/your them package.</li> </ol> <p>Here you will find your css file. </p> <p>You can change the css element in your target file.</p> |
40,246,717 | 0 | <pre><code>try { File f=new File("test.html"); BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f))); String content=null; while((content=reader.readLine())!=null) { System.out.println(content); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } </code></pre> |
25,529,517 | 0 | <p>If you take a look on the links in the mobfox and google ad mob website, you'll see that the adapter is not updated anymore from 08/04/2013...</p> |
29,550,993 | 0 | <p>Mine started working when I set <code>AllowDBNull</code> to True on a date field on a data table in the xsd file.</p> |
39,110,574 | 0 | <pre><code>df.set_index('date').groupby('type', as_index=False).resample('d').bfill().reset_index().drop('level_0', axis=1) Out: date type value 0 2016-01-01 a 1 1 2016-01-02 a 3 2 2016-01-03 a 3 3 2016-01-04 a 3 4 2016-01-10 b 4 5 2016-01-11 b 7 6 2016-01-12 b 7 7 2016-01-13 b 7 </code></pre> |
1,724,016 | 0 | <p>Is <code>@networks_domentic</code> getting set properly in the controller? Add <code><%= @networks_domestic.inspect %></code> right before line 52 and see what you get. Check for <code>@networkd_domestic.nil?</code> in the controller and make sure you don't send <code>nil</code> to the view.</p> <p>EDIT:</p> <p>If you look at the source for <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#M001628" rel="nofollow noreferrer"><code>options_from_collection_for_select</code></a> you will see that it is calling <code>map</code> on the collection you pass (@networks_domestic in this case).</p> |
22,312,417 | 0 | Extraing data from json array and separate according to type <p>So I am currently trying to extract information from a json array using <code>json_decode($result,true)</code>. The background here is that there is another php script getting information from a database and it is sending the data to me as <code>json_encoded</code> result.</p> <p>using <code>print_r($json)</code> i get the following</p> <pre><code>Array ( [result] => 1 [message] => Query Successful [data] => Query Output [0] => Array ( //Several values [test] => test [Example] => catcatcat [choice2] => B ) [1] => Array [test]=> test //etc.... </code></pre> <p>I understand we can use a simple for loop to get some stuff to display or in this case I used</p> <pre><code>for($i=0;$i<=count($json); $i++){ echo $json[$i]['test']; //etc etc } </code></pre> <p>and that will display the value. But what I cant figure out is how to send that to my HTML page as an output as a list. </p> <p>I am trying to get it to display as following</p> <ol> <li>Test catcatcat B</li> <li>Test etc etc</li> </ol> <p>--This may be a separate question but for me to learn I want to know if it's possible to actually break down the array and send to html as radio input and turn it into a value to choose from.</p> |
10,832,071 | 0 | Main data model on android <p>I have an android application with a number of activities. I have a singleton class holding my main data model which all activities access to get data.</p> <p>The problem is that sometimes the android GC decides to destroy my singleton when the app in the background (when you press the home button). Is there anyway that I can bypass this?</p> |
25,707,303 | 0 | <p>In the event where you want to move from form1 to form2</p> <pre><code>Form2 obj = new Form2(textbox1.Text,DateTime.Value); this.Hide(); Form2.Show(); </code></pre> <p>In form 2</p> <pre><code>public form2() { InitializeComponent(); //if you need something } string someName=""; DateTime dt; public form2(string name,Datetime value) { InitializeComponent(); someName=name; dt=value; } </code></pre> <p>Now your someName will have that value</p> |
39,818,718 | 0 | Open Cart Error getspecialprice <p>But I get error:</p> <blockquote> <p>Error = Notice: Undefined property: Proxy::getSpecialPriceEnd in /home/deqorati/public_html/catalog/controller/module/showintabs_output.php on line 100</p> </blockquote> <p>How can I solve this problem? Can anyone help me? Code is below.</p> <pre><code>if ((float)$result['special']) { $special_info = $this->model_catalog_product->getSpecialPriceEnd($result['product_id']); $special_date_end = strtotime($special_info['date_end']) - time(); } else { $special_date_end = false; } </code></pre> |
2,244,299 | 0 | getting error when click on the Image button? <p>in my application i have vidoes there with image when i click on any video it is showing this message.</p> <p>Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. </p> <p>i place the enbaleEven validation="true" both in webconfig in that particular page. even though it is giving same error </p> |
8,513,882 | 0 | <p>You could capture only the bit you want to keep:</p> <pre><code>"1234 1/2 Old Town Alexandria".replace(/^(\d*\s+)1\/\d\s/, '$1'); </code></pre> |
12,919,181 | 0 | j2me connection to spring security <p>I have an application that use spring security for authentification I m trying to connect to this application from j2ME midlet</p> <p>so I am sending an HTTP request from a j2me application using the post method to send username and the password but it doesn't work</p> <p>the post methode code is fine. it works with other services of the same application (which not require authentification)</p> <p>but when it comes to authentification I'm getting the response code 302</p> <p>here is my code</p> <pre><code> OutputStream os = null; HttpConnection connection = null; InputStream is = null; StringBuffer sb = new StringBuffer(); try { connection = (HttpConnection)Connector.open("http://localhost:8080/myAppli/j_spring_security_check"); connection.setRequestMethod(HttpConnection.POST); connection.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.1"); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); os = connection.openOutputStream(); byte data[] =("j_username=appliusername&j_password=applipassword").getBytes(); os.write(data); os.flush(); int respCode=connection.getResponseCode(); if (connection.getResponseCode() == HttpConnection.HTTP_OK) { is = connection.openInputStream(); if (is != null ) { int ch = -1; while ((ch = is.read()) != -1) { sb.append((char)ch); } } }else { System.out.println("Error in opening HTTP Connection. Error#" + respCode); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (is != null) { is.close(); //is = null; } if (os != null) { os.close(); //is = null; } if (connection != null) { connection.close(); // connection = null; } }catch (Exception e2) { e2.printStackTrace(); } } </code></pre> |
21,103,187 | 0 | <pre><code>$link="download.php/1000338/The%20Rise%20and%20Fall%20of%20Legs%20Diamond%20%5B1960%5D.avi.torrent"; $x=explode('/',$link); $id=$x[1]; </code></pre> <p>demo:<a href="http://codepad.viper-7.com/cWYXKe" rel="nofollow">http://codepad.viper-7.com/cWYXKe</a></p> <p>using your code:</p> <pre><code> $rss = simplexml_load_file('RSS FEED HERE'); echo '<h1>'. $rss->channel->title . '</h1>'; foreach ($rss->channel->item as $item) { //echo the link echo '<h2><a href="'. $item->link .'">' . $item->title . "</a></h2>"; //echo the date echo "<p>" . $item->pubDate . "</p>"; //echo the description echo "<p>" . $item->description . "</p>" $x=explode('/',$item->link); $id=$x[1]; } </code></pre> <p>then use $id any way you like</p> |
24,665,912 | 0 | <p>I solved my problem. The problem is since I am using RGBA as internal format I am telling opengl to use 4 bytes per pixel. However it is actually 3.</p> <pre><code>glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image->width, image->height, 0, GL_RGB,//The change is here GL_UNSIGNED_BYTE, image->pixels); </code></pre> <p>When I made this change, it worked.</p> |
40,626,798 | 0 | <p>it's nicer to filter like this:</p> <pre><code>string[] files = System.IO.Directory.GetFiles(dir, "*.doc", System.IO.SearchOption.TopDirectoryOnly); </code></pre> |
30,022,795 | 0 | Postgres Upgrade Interrupted, pg_version now inconsistent <p>Recently attempted an upgrade from 9.3 to 9.4 on an Ubuntu 14.04 Postgres installation, something went awry and the system lost power midway through the upgrade. Now the cluster won't start and when I try to move the data file to a new system and start it, there are inconsistencies in the data files and PG_VERSIONs are varied between 9.3 and 9.4.</p> <p>Is there any way to recover and make consistent the files to launch under a new cluster?</p> |
30,825,138 | 0 | <p>You need to have marked your files as localizable first. Select file (e. g. a storyboard) and then click the Localize button. Then, you will have that files listed when adding languages. </p> |
20,100,986 | 0 | <p>The features you are trying to use are part of Web API 2. Since you mentioned you're using MVC 4, I expect you will want to upgrade your references to MVC 5 and Web API 2.</p> <p>Find out more about these features at <a href="http://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/">http://www.strathweb.com/2013/06/ihttpactionresult-new-way-of-creating-responses-in-asp-net-web-api-2/</a></p> |
17,452,864 | 0 | <p>This answer is probably going to need a little refinement from the community, since it's been a long while since I worked in this environment, but here's a start -</p> <p>Since you're new to multi-threading in C++, start with a simple project to create a bunch of pthreads doing a simple task.</p> <p>Here's a quick and small example of creating pthreads:</p> <pre><code>#include <stdio.h> #include <stdlib.h> #include <pthread.h> void* ThreadStart(void* arg); int main( int count, char** argv) { pthread_t thread1, thread2; int* threadArg1 = (int*)malloc(sizeof(int)); int* threadArg2 = (int*)malloc(sizeof(int)); *threadArg1 = 1; *threadArg2 = 2; pthread_create(&thread1, NULL, &ThreadStart, (void*)threadArg1 ); pthread_create(&thread2, NULL, &ThreadStart, (void*)threadArg2 ); pthread_join(thread1, NULL); pthread_join(thread2, NULL); free(threadArg1); free(threadArg2); } void* ThreadStart(void* arg) { int threadNum = *((int*)arg); printf("hello world from thread %d\n", threadNum); return NULL; } </code></pre> <p>Next, you're going to be using multiple opus decoders. Opus appears to be thread safe, so long as you create separate OpusDecoder objects for each thread. </p> <p>To feed jobs to your threads, you'll need a list of pending work units that can be accessed in a thread safe manner. You can use <code>std::vector</code> or <code>std::queue</code>, but you'll have to use locks around it when adding to it and when removing from it, and you'll want to use a counting semaphore so that the threads will block, but stay alive, while you slowly add workunits to the queue (say, buffers of files read from disk).</p> <p>Here's some example code similar from above that shows how to use a shared queue, and how to make the threads wait while you fill the queue:</p> <pre><code>#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <queue> #include <semaphore.h> #include <unistd.h> void* ThreadStart(void* arg); static std::queue<int> workunits; static pthread_mutex_t workunitLock; static sem_t workunitCount; int main( int count, char** argv) { pthread_t thread1, thread2; pthread_mutex_init(&workunitLock, NULL); sem_init(&workunitCount, 0, 0); pthread_create(&thread1, NULL, &ThreadStart, NULL); pthread_create(&thread2, NULL, &ThreadStart, NULL); // Make a bunch of workunits while the threads are running. for (int i = 0; i < 200; i++ ){ pthread_mutex_lock(&workunitLock); workunits.push(i); sem_post(&workunitCount); pthread_mutex_unlock(&workunitLock); // Pretend that it takes some effort to create work units; // this shows that the threads really do block patiently // while we generate workunits. usleep(5000); } // Sometime in the next while, the threads will be blocked on // sem_wait because they're waiting for more workunits. None // of them are quitting because they never saw an empty queue. // Pump the semaphore once for each thread so they can wake // up, see the empty queue, and return. sem_post(&workunitCount); sem_post(&workunitCount); pthread_join(thread1, NULL); pthread_join(thread2, NULL); pthread_mutex_destroy(&workunitLock); sem_destroy(&workunitCount); } void* ThreadStart(void* arg) { int workUnit; bool haveUnit = true; while(haveUnit) { sem_wait(&workunitCount); pthread_mutex_lock(&workunitLock); // Figure out if there's a unit, grab it under // the lock, then release the lock as soon as we can. // After we release the lock, then we can 'process' // the unit without blocking everybody else. haveUnit = !workunits.empty(); if ( haveUnit ) { workUnit = workunits.front(); workunits.pop(); } pthread_mutex_unlock(&workunitLock); // Now that we're not under the lock, we can spend // as much time as we want processing the workunit. if ( haveUnit ) { printf("Got workunit %d\n", workUnit); } } return NULL; } </code></pre> |
22,936,621 | 0 | <p>If I'm not misunderstanding your question, this will work:</p> <pre><code>SELECT PE.PROJECT_ESTIMATES_ID, IF( PE.PROJECT_ESTIMATES_ID = '046a190e-a895-4ce2-bb10-7a583d648b99', 0, PE.PROJECT_ESTIMATES_ID) AS STEP_DESCRIPTION FROM PROJECT_ESTIMATES PE, MST_PIPELINE_STEPS MPS WHERE PE.`PROJECT_BASIC_INFORMATION_ID` ='29ab9760-c75b-4479-882c-bc84426d55ac' AND PE.`TENANT_ID`='{0559cdcb-c63b-4c81-be91-b78Tenant1000' AND PE.PIPELINE_STEP_ID=MPS.PIPELINE_STEP_ID ORDER BY PE.MODIFIED_DATE DESC </code></pre> <p>Unless of course you meant you want zero rather than blank or null in which case this is what you want:</p> <pre><code>SELECT PE.PROJECT_ESTIMATES_ID IF( LENGTH (ISNULL( PE.PROJECT_ESTIMATES_ID,'')) > 0, PE.PROJECT_ESTIMATES_ID, 0) AS STEP_DESCRIPTION FROM PROJECT_ESTIMATES PE, MST_PIPELINE_STEPS MPS WHERE PE.`PROJECT_BASIC_INFORMATION_ID` ='29ab9760-c75b-4479-882c-bc84426d55ac' AND PE.`TENANT_ID`='{0559cdcb-c63b-4c81-be91-b78Tenant1000' AND PE.PIPELINE_STEP_ID=MPS.PIPELINE_STEP_ID ORDER BY PE.MODIFIED_DATE DESC </code></pre> |
18,935,066 | 0 | <p>I'm not sure if :current_location should be a symbol in your model if block. Calling the current_location method inside an object will resolve to the boolean value of current_location (provided your controller is saving it correctly) so change the code to:</p> <pre><code>def geocode_by_ip_address(offer) if current_location offer.address = request.location.address end end </code></pre> <p>EDIT: Sorry just realised that this is in a helper and not the model, :current_location and current_location should both be undefined in your helper, you would need to pass that logic in (or I would put the if block inside the model and then call geocode_by_ip_address with the if block removed from there)</p> |
14,432,346 | 0 | How can I build a OSGi bundle with maven that includes non-code resources from an OSGi fragment? <p>I have an OSGi fragment containing non-code resources - that is effectively a jar file containing a set of resources (image files, etc) - that I have built with maven.</p> <p>I would like to build another bundle with maven which depends on the fragments with the resources. That is, when the code in this bundle is executed, I want the resources from my fragment to be loaded and available with Java's getResources() command.</p> <p>How can I do this?</p> |
39,997,713 | 0 | <p>You want an outer join to get all rows from table_1 and the matching ones from table2</p> <pre><code>select t1.id, t1.val - coalesce(t2.val, 0) as result from table_1 t1 left join table_2 t2 on t1.id = t2.id; </code></pre> <p>The <code>coalesce(t2.val, 0)</code> is necessary because the outer join will return <code>null</code> for those rows where no id exists in table_2 but <code>t1.val - null</code> would yield <code>null</code></p> |
4,549,430 | 0 | <p>No, but you can pass your "crazy stuff" into <code>supportsImage</code>, e.g.</p> <pre><code>supportsImage(function(result){ if(result) { //Do some crazy stuff } }); </code></pre> |
15,364,637 | 0 | Linq to Xml - Input String <p>I am using Linq to Xml to parse some xml messages coming from a legacy system. One of the messages is coming in as Name / Value pairs. So I am doing the lookup by name and then trying to get the equivalent value. However, when the Value is blank (<code><Value/></code>) my code is throwing the error <code>Input string was not in a correct format.</code></p> <p>I am trying to figure out the best way to solve this issue. Any suggestions would be greatly appreciated (Trying to fill property with nullable int type int?). </p> <p>Code Example:</p> <pre><code>myRecord.myField= xdoc.Descendants("Information") .Where(x => (string)x.Element("Name") == "myField") .Select(x => (int?)x.Element("Value")).FirstOrDefault(); </code></pre> <p>XML Snippet:</p> <pre><code> <Information> <Name>myField</Name> <Value /> </Information> </code></pre> <p>Always appreciate the feedback / input.</p> <p>Thanks,</p> <p>S</p> |
16,756,354 | 0 | <p>The short answer: Objects. Object oriented programming allows you to encapsulate data so that it doesn't pollute the global namespace. As your projects grow larger, it becomes unmaintainable to have all your data in the global namespace. Objects allow you to group data and methods into meaningful units, which can then be re-used and maintained more easily.</p> <p>So for instance with the example you provided we could make deck and hand objects. This then allows us to create multiple deck and hands easily because these objects encapsulate and manage their data.</p> <p>As a rough outline of how you might organize your classes / methods:</p> <pre><code>class Deck def shuffle end def draw_hand end end class Hand end class Card end </code></pre> |
34,382,725 | 0 | Control how angularjs converts date to json string <p>I have an object containing a javacsript date. Something like this:</p> <pre><code>var obj = { startTime: new Date() .... } </code></pre> <p>When Angularjs converts the object to JSON (for example, when sending it over $http), it converts the date to a string such as:</p> <pre><code>2015-12-20T15:35:15.853Z </code></pre> <p>I would like to have a timestamp instead of this string. What is the best way to achieve this?</p> |
13,588,677 | 0 | <p>First implementation i.e. the array implementation is correct and preferred. But it depends on the programmer. Best practice is not to change/alter the pointer i.e. starting/base address should be preserved, should not be incremented or decremented. </p> |
19,800,259 | 0 | VBA Writing Array to Range Causing Run-Time Error '7': Out Of Memory <p><strong>The Task</strong></p> <p>I'm working on a VBA project wherein I store the data from a sheet in a <code>Variant Array</code>, do a bunch of calculations with the data in the <code>Array</code>, store the results of those computations in a few other <code>Arrays</code>, then finally I store all the "results arrays" in another <code>Variant Array</code> and write that array to a range in a new sheet. </p> <p>Note: this process has been working fine ever since I first wrote the procedure.</p> <p><strong>The Issue</strong></p> <p>After a very minor logic change, my final <code>Array</code> will no longer write to the specified range. I get <code>Run-time error '7': Out of memory</code> when I try. I changed the logic back in case that was my issue, but I still get the error. </p> <p>After doing some research, I tried to erase all the arrays (including the one containing all the sheet data) before writing to the range, but that didn't work either. I've checked Task Manager and that shows my RAM as having a lot of free space (almost 6K MBs available and over 1k Mbs "free"). (Task Manager shows the Excel process as using around 120 MBs.)</p> <p><strong>The Code (Snippet)</strong></p> <pre><code>Dim R As Range Dim ALCount As Long Dim All(5) As Variant Dim sht As Worksheet Dim Arr1() As Long Dim Arr2() As Date Dim Arr3() As Date Dim Arr4() As Long Dim Arr5() As String All(1) = Arr1 All(2) = Arr2 All(3) = Arr3 All(4) = Arr4 All(5) = Arr5 Set R = sht.Cells(2,1) R.Resize(ALCount - 1, 5).Value = Application.Transpose(All) </code></pre> <p><strong>More Details</strong></p> <pre><code>My device: Win 7 64-Bit Excel: 2010 32-Bit File Size: <20 MBs Macro Location: Personal Workbook Personal WB Size: < 3 MBs </code></pre> <p><strong>Edit: Array Size: 773x5</strong></p> <p>Any thoughts on why this might be happening?</p> |
24,058,813 | 0 | <p>When two objects have the same __array_priority__:</p> <pre><code>>>> np.array([[1,0],[0,1]]).__array_priority__ 0.0 >>> a.__array_priority__ 0.0 </code></pre> <p>And only one object's methods can be used, the tie is resolved by using the first array's/object's methods. (In your case __array_wrap__)</p> <p>From the question it seems like your class' methods should always be preferred, since they are the same (through inheritance) or overridden.</p> <p>So I would just crank up the __array_priority__. </p> <pre><code>class Template(np.ndarray): __array_priority__ = 1.0 (Or whichever value is high enough) ... </code></pre> <p>After you do this no matter where the template object is in a calculation. It's methods will be preferred over standard arrays' methods.</p> |
34,124,826 | 0 | <p>Try using <code>zip</code></p> <pre><code>>>> print zip(*ss) [(2, 5, 4), (4, 6, 8), (5, 7, 9), (2, 6, 4)] </code></pre> |
7,493,744 | 0 | <p>The only php based solution that I know is PHP Manual Creator from kubelabs.com (http://www.kubelabs.com/phpmanualcreator/)</p> |
39,441,513 | 0 | Variable latency in Windows networking <p>I have a PLC that sends UDP packets every 24ms. "Simultaneously" (i.e. within a matter of what should be a few tens or at most hundreds of microseconds), the same PLC triggers a camera to snap an image. There is a Windows 8.1 system that receives both the images and the UDP packets, and an application running on it that should be able to match each image with the UDP packet from the PLC.</p> <p>Most of the time, there is a reasonably fixed latency between the two events as far as the Windows application is concerned - 20ms +/- 5ms. But sometimes the latency rises, and never really falls. Eventually it goes beyond the range of the matching buffer I have, and the two systems reset themselves, which always starts back off with "normal" levels of latency.</p> <p>What puzzles me is the variability in this variable latency - that sometimes it will sit all day on 20ms +/- 5ms, but on other days it will regularly and rapidly increase, and our system resets itself disturbingly often.</p> <p>What could be going on here? What can be done to fix it? Is Windows the likely source of the latency, or the PLC system?</p> <p>I 99% suspect Windows, since the PLC is designed for real time response, and Windows isn't. Does this sound "normal" for Windows? If so, even if there are other processes contending for the network and/or other resources, why doesn't Windows ever seem to catch up - to rise in latency when contention occurs, but return to normal latency levels after the contention stops?</p> <p>FYI: the Windows application calls <code>SetPriorityClass( GetCurrentProcess(), REALTIME_PRIORITY_CLASS )</code> and each critical thread is started with <code>AfxBeginThread( SomeThread, pSomeParam, THREAD_PRIORITY_TIME_CRITICAL )</code>. There is as little as possible else running on the system, and the application only uses about 5% of the available Quad-core processor (with hyperthreading, so 8 effective processors). There is no use of <code>SetThreadAffinityMask()</code> although I am considering it.</p> |
3,444,956 | 0 | <p>Set the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumn.headercontainerstyle.aspx" rel="nofollow noreferrer">HeaderContainerStyle</a> on the first column explicitly so it will not fall back to using the implicit one: </p> <pre><code><ListView Name="lvEverything"> <ListView.Resources> <Style TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="LayoutTransform"> <Setter.Value> <RotateTransform Angle="-90"/> </Setter.Value> </Setter> <Setter Property="Width" Value="250"></Setter> </Style> <Style x:Key="FirstColumnStyle" TargetType="GridViewColumnHeader"/> </ListView.Resources> <ListView.View> <GridView> <GridViewColumn Header="First Column" DisplayMemberBinding="{Binding FirstColumn}" HeaderContainerStyle="{StaticResource FirstColumnStyle}"/> <GridViewColumn Header="Second Column" DisplayMemberBinding="{Binding SecondColumn}"/> </GridView> </ListView.View> </ListView> </code></pre> <p>Or, if you are creating the columns in code: </p> <pre><code>GridViewColumn firstColumn = ...; firstColumn.HeaderContainerStyle = new Style(); </code></pre> |
6,354,547 | 0 | <p>it's a bit of an usual approach of trying to 'grab' the active outlook object... Especially, if there isn't an active object. A more standard approach is something to the effect of:</p> <pre><code>outlookApplication = new Application(); outlookNamespace = m_OutlookApplication.GetNamespace("mapi"); // If an outlook app is already open, then it will reuse that // session. Else it will perform a fresh logon. outlookNamespace.Logon(accountName, password, true, true); </code></pre> |
22,756,732 | 0 | <p>Kurty is correct in that you shouldn't need to subclass <code>DragShadowBuilder</code> in this case. My thought is that the view you're passing to the <code>DragShadowBuilder</code> doesn't actually exist in the layout, and therefore it doesn't render.</p> <p>Rather than passing <code>null</code> as the second argument to <code>inflater.inflate</code>, try actually adding the inflated <code>View</code> to the hierarchy somewhere, and then passing it to a regular <code>DragShadowBuilder</code>:</p> <pre><code>View dragView = findViewById(R.id.dragged_item); mDragShadowBuilder = new DragShadowBuilder(dragView); v.startDrag(null, mDragShadowBuilder, null, 0); </code></pre> <p><strong>EDIT</strong></p> <p>I'm aware that having the <code>dragged_item</code> view being rendered all the time isn't what you want, but if it works then at least we know where the problem is and can look for a solution to that instead!</p> |
13,057,939 | 0 | <p>Be sure not to mix the system variable path and the user variable systemp path. I feel OK in calling "java" without the absolute path (when I know how JAVA_HOME and PATH are configured).</p> |
1,985,670 | 0 | <p>You might also want to study other <a href="http://www.dclunie.com/medical-image-faq/html/part8.html" rel="nofollow noreferrer">DICOM</a> sources. <a href="http://www.pixelmed.com/index.html#PixelMedJavaDICOMToolkit" rel="nofollow noreferrer">PixelMed</a>, in particular, contains an XML and XSLT based validator. Several <a href="http://rsbweb.nih.gov/ij/plugins/index.html" rel="nofollow noreferrer">DICOM plugins</a> are available for <a href="http://rsbweb.nih.gov/ij/" rel="nofollow noreferrer">ImageJ</a>.</p> |
25,675,328 | 0 | <p>You didn't say what error, but looks like changing:</p> <pre><code>if(nodePtr = NULL) </code></pre> <p>to</p> <pre><code>if(nodePtr == NULL) ^^ </code></pre> <p>is what you need.</p> |
21,516,047 | 0 | <p>Are you running the whole import in one big transaction? Try to split it up in transactions of, say, 10k nodes. You should still however not run into "too many open files". If you do an "lsof" (terminal command) at that time, can you see which files are open?</p> <p>Data that is committed stays persisted in a neo4j database. I think that the import fails with this error and nothing stays imported since the whole import runs in one big transaction.</p> |
21,376,320 | 0 | <p>The best and clear way to do that is:</p> <pre><code>var list = {}; list.name = /^[A-Za-z\s.]+$/; list.general = /^[A-Za-z0-9\s.\-\/]{2,20}$/; list.email = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/; list.digit = /^[+]?[0-9\s]+$/; </code></pre> <p>without loops, etc</p> |
24,517,247 | 0 | Artifact 'com.android.tools.build:gradle:0.12.1:gradle.jar' not found on Android Studio 0.8.1 <p>I've upgraded to Android Studio 0.8.1 and when I try to compile any app it fails with the following error:</p> <pre><code>Error:Artifact 'com.android.tools.build:gradle:0.12.1:gradle.jar' not found on Android Studio 0.8.1 </code></pre> <p>I tried to update manually the plugin from gradle.org and it does not contain any gradle.jar binary.</p> <p>How to resolve this error?</p> |
8,839,095 | 0 | What is the GPars default pool size? <p>I thought this would have been an easy thing to find but I've failed.</p> <p>If I use GPars in my Groovy application and I don't specify a pool size how many threads will be created? Is there a default pool size without setting one?</p> <pre><code>// How many threads will be created? What is the default pool size? GParsExecutorsPool.withPool { // do stuff... } </code></pre> |
37,559,216 | 0 | <p>Not sure if this will be helpful to anyone, but I did get this working.</p> <ol> <li>Removed the abstract class and made it an interface with a single public getEncounterId() method</li> <li>Modified FooEncounter to implement the above interface</li> <li>Removed generics from the EncounterPDFExport class</li> <li>Modified the encounter field to utilize the above interface rather than a generic</li> <li><p>Apparently, I'm hitting some Hibernate bug/limitation when accessing fields within FooEncounter. Accessing Encounter within EncounterPDFExport works OK, though. I modified my Spring Data JPA Repository to look like the following (note the modification from finding by encounter.encounterId vs. just encounter):</p> <pre><code>@Repository public interface EncounterPDFExportRepository extends PagingAndSortingRepository<EncounterPDFExport, Long> { EncounterPDFExport findOneByEncounter(@Param("encounter") Encounter encounter); } </code></pre></li> </ol> <p>The Hibernate bug in question seems to be related to <a href="https://jira.spring.io/browse/DATAJPA-836" rel="nofollow">https://jira.spring.io/browse/DATAJPA-836</a>.</p> |
25,643,435 | 0 | How to run tests with maven twice? <p>I want to run maven tests twice, the second run must be straight after the first one. Is there any command to fire mvn tests twice?</p> |
2,334,943 | 0 | <p>Heuristics are algorithms, so in that sense there is none, however, heuristics take a 'guess' approach to problem solving, yielding a 'good enough' answer, rather than finding a 'best possible' solution.</p> <p>A good example is where you have a very hard (read NP-complete) problem you want a solution for but don't have the time to arrive to it, so have to use a good enough solution based on a heuristic algorithm, such as finding a solution to a travelling salesman problem using a genetic algorithm.</p> |
17,068,781 | 0 | PoEdit does not see gettext in html tags <p>I use PoEdit. It scans all .php files, find each time I use gettext() or _(), and update the .po and .mo files.</p> <p>I have a .php file that has html tags and php in it, like this :</p> <pre><code><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <?php $message = _("blabla"); ?> </code></pre> <p>Here POEdit does not see "blabla" and so it is not added in the .po file.</p> <p>Is there a way to make PoEdit scan this portion of php ?</p> |
17,504,066 | 0 | c++ error when use parallel_for <p>I'm trying to use parallel_for, but I get an error, the code is:</p> <pre><code>#include "stdafx.h" #include <iostream> #include <windows.h> #include <ppl.h> using namespace std; using namespace concurrency; int _tmain(int argc, _TCHAR* argv[]) { parallel_for(size_t(0), 50, [&](size_t i) { cout << i << ","; } cout << endl; getchar(); return 0; } </code></pre> <p>The error is:</p> <blockquote> <p>IntelliSense: no instance of overloaded function "parallel_for" matches the argument list >argument types are: (size_t, int, lambda []void (size_t i)->void</p> </blockquote> <p>This is only example, I have to use it in bigger project, but first of all I want to understand how to use it properly.</p> <p>*<strong><em>edit</em>*</strong></p> <p>i changed the code to:</p> <pre><code>parallel_for(size_t(0), 50, [&](size_t i) { cout << i << ","; }); </code></pre> <p>but still i get the annoying error: IntelliSense: no instance of overloaded function "parallel_for" matches the argument list argument types are: (size_t, int, lambda []void (size_t i)->void)</p> |
32,670,003 | 0 | RSpec - How to get a better error message? <p>I am used to PHPUnit, so I found RSpec to be inferior when it comes to showing what has gone wrong, where and why.</p> <p>For example, in PHPUnit, I can get the stack trace when an exception is raised (and even with -b option in RSpec, all I can get is the stack trace of RSpec exceptions, and not Rails's)</p> <p>Also, when some error occurs, it shows you the <strong>ACTUAL</strong> value and the <strong>EXPECTED</strong> value.</p> <p>Those two features I'd like to achieve in RSpec. Getting a detailed error message that includes the stack trace, in case of an Exception of Ruby or of Rails, and to know what was the actual value.</p> <p>Any ideas of how to accomplish this?</p> |
28,736,821 | 0 | <p>By looking at the <a href="https://github.com/brunoscopelliti/ng-unique/blob/master/Gruntfile.js#L128" rel="nofollow" title="Gruntfile.js">Gruntfile.js</a> you can see the tasks registered.</p> <p>There is currently three registered tasks; </p> <pre><code>grunt.registerTask('build-js', ['jshint', 'karma:unit', 'uglify:ngUnique']); grunt.registerTask('build-css', ['sass:prod']); grunt.registerTask('build-all', ['build-css', 'build-js']); </code></pre> <p>As you can see from the source, the <code>build-js</code> task includes running the <code>karma:unit</code> configuration.</p> <p>To trigger this registered task, you have to run <code>grunt build-js</code>, or if you just want to run the Karma configuration you have to run <code>grunt karma:unit</code>.</p> |
40,786,590 | 0 | Java 8 type inference cause to omit generic type on invocation <p>I have a Problem with a generic method after upgrading to Java 1.8, which was fine with Java 1.6 and 1.7 Consider the following code: </p> <pre><code>public class ExtraSortList<E> extends ArrayList<E> { ExtraSortList(E... elements) { super(Arrays.asList(elements)); } public List<E> sortedCopy(Comparator<? super E> c) { List<E> sorted = new ArrayList<E>(this); Collections.sort(sorted, c); return sorted; } public static void main(String[] args) { ExtraSortList<String> stringList = new ExtraSortList<>("foo", "bar"); Comparator<? super String> compGen = null; String firstGen = stringList.sortedCopy(compGen).get(0); // works fine Comparator compRaw = null; String firstRaw = stringList.sortedCopy(compRaw).get(0); // compiler ERROR: Type mismatch: cannot convert from Object to String } } </code></pre> <p>I tried this with the Oracle javac (1.8.0_92) and with Eclipse JDT (4.6.1) compiler. It is the same result for both. (the error message is a bit different, but essentially the same)</p> <p>Beside the fact, that it is possible to prevent the error by avoiding raw types, it puzzles me, because i don't understand the reason.</p> <p>Why does the raw method parameter of the sortedCopy-Method have any effect on the generic type of the return value? The generic type is already defined at class level. The method does not define a seperate generic type. The reference <code>list</code> is typed to <code><String></code>, so should the returned List.</p> <p>Why does Java 8 discard the generic type from the class on the return value?</p> <p><strong>EDIT:</strong> If the method signature of sortedCopy is changed (as pointed out by biziclop) to</p> <pre><code>public List<E> sortedCopy(Comparator c) { </code></pre> <p>then the compiler does consider the generic type <code>E</code> from the type <code>ExtraSortList<E></code> and no error appears. But now the parameter <code>c</code> is a raw type and thus the compiler cannot validate the generic type of the provided Comparator.</p> <p><strong>EDIT:</strong> I did some review of the Java Language Specification and now i think about, whether i have a lack of understanding or this is a flaw in the compiler. Because:</p> <ul> <li><a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.3" rel="nofollow noreferrer" title="Scope of a Declaration">Scope of a Declaration</a> of the generic type <code>E</code> is the class <code>ExtraSortList</code>, this includes the method <code>sortedCopy</code>.</li> <li>The method <code>sortedCopy</code> itself does <em>not declare</em> a generic type variable, it just refers to the type variable <code>E</code> from the class scope. see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.4" rel="nofollow noreferrer" title="Generic Methods">Generic Methods</a> in the JLS</li> <li>The JLS also states in the same section <blockquote> <p>Type arguments may not need to be provided explicitly when a generic method is invoked, as they can often be inferred (§18 (Type Inference)).</p> </blockquote></li> <li>The reference <code>stringList</code> is defined with <code>String</code>, thus the compiler does not need to infer a type for<code>E</code> on the invocation of <code>sortedCopy</code> because it is already defined.</li> <li>Because <code>stringList</code> already has a reified type for <code>E</code>, the parameter <code>c</code> should be <code>Comparator<? super String></code> for the given invocation.</li> <li>The return type should also use the already reified type <code>E</code>, thus it should be <code>List<String></code>.</li> </ul> <p>This is my current understanding of how i think the Java compiler should evaluate the invocation. If i am wrong, an explanation why my assumptions are wrong would be nice.</p> |
37,758,703 | 0 | Meteor deploy on Heroku Error deploying Node <p>I built a Meteor app, and it runs on my local machine, where I have meteor installed.</p> <p>I have never deployed an app online, and am trying to put the app on heroku.</p> <p>I first tried to use buildpack/jordansissel/heroku-buildpack-meteor.git, but I got an error "Meteor requires Node v0.10.41 or later"</p> <p>I then tried to use buildpack/michaltakac/meteor-buildpack-horse.git but it failed to push because it couldn't unpack Node.</p> <p>Lastly I've tried kevinseguin/heroku-buildpack-meteor.git but I get lots of warnings about npm depricated <a href="http://prntscr.com/bewzak" rel="nofollow">http://prntscr.com/bewzak</a> </p> <p>When I look at the logs it says "Slug compilation failed: failed to compile Node.js app"</p> <p>I also get Error: MONGO_URL must be set in environment</p> <p>I don't know enough to understand what the errors are, or how to get my app deployed</p> <p>Image of errors: <a href="http://prntscr.com/bex0av" rel="nofollow">http://prntscr.com/bex0av</a></p> <p>my goal it to get the site on gr-fireworks.herokuapp.com</p> <p>I contacted Heroku helpdesk and they said they couldn't help me because the issue was outside the scope of Heroku Support.</p> <p>I tried to reach out to Snap CI who said they were successful in deploying it, but when I try to type in exactly what they did, I am still getting the error about Node <a href="https://snap-ci.com/ankitsri11/Fireworks/branch/master/logs/defaultPipeline/1/Heroku?back_to=build_history" rel="nofollow">https://snap-ci.com/ankitsri11/Fireworks/branch/master/logs/defaultPipeline/1/Heroku?back_to=build_history</a></p> <p>My repository I'm trying to deloy is on git at github.com/jschwarzwalder/Fireworks</p> |
19,203,427 | 0 | <p>Check out <a href="http://superfeedr.com/" rel="nofollow">Superfeedr</a> (which I created!) for the RSS polling aspects. We will send your server a notification (including the update!) every time a feed has a new entry. Then, you'll have to fanout that update to all of your app users using <a href="https://developer.android.com/google/gcm/index.html" rel="nofollow">Google Cloud Messaging</a>. </p> |
40,417,777 | 0 | log4cplusud.lib missing when building with VisualStudio <p>i already have a complete VS Solution (that is working on other systems) and i am trying to get it to build on my computer aswell.</p> <p>The program is using log4cplus to (obviously) log - i already included the needed files, but when building VS tells me, that <code>log4cplusUD.lib</code> is missing. When searching through log4cplus i only found <code>log4cplusS.lib</code> and <code>log4cplusD.lib</code></p> <p>Does somebody know how to get this library or how to adjust VS to accept the other libraries? Thanks in advance :)</p> |
33,244,208 | 0 | <pre><code>// ==UserScript== // @name Test GM_addValueChangeListener // @grant GM_addValueChangeListener // @grant GM_setValue // ==/UserScript== GM_addValueChangeListener("abc", function() { console.log(arguments) }); GM_setValue("abc",123); </code></pre> |
Subsets and Splits