Daily Archives

Articles indexed Wednesday October 31 2012

Page 3/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How does the Ubuntu upgrade process work?

    - by IDWMaster
    How does Ubuntu upgrade seamlessly to a newer distribution, while the operating system is still running? I'm upgrading from 10.10 to 11.04, and I've upgraded several times before, and it's as simple as running update-manager -d and downloading and installing them, then rebooting. How exactly does this work though? How is the upgrade manager able to update the operating system while it is still in use?

    Read the article

  • Google Analytics - Unable to get GA Tracking

    - by Pure.Krome
    We've been using GA for a few years with no probs. About 2-3 weeks ago we tried to clean up some of our tracking and on one of our profiles, it's not working anymore (since oct 10.) First, some context then some GA Debugging code. 1. Context. We have the following setup: different root domains AND different sub-domains on one of the root domains. www.website.com www.website.com.au www.anotherWebsite.com foo.website.com baa.website.com So what we're doing is the following: each root domain and each sub-domain get their own tracking code. This way we can allow separate people (from outside our company) to access only their own data. Eg. a manager for foo.website.com can only see data related to that domain .. and see data on the other domains. Have a last account which is the SUM of all the domains. this is for us. so we can see total numbers. So to do this, we have two trackers that fire off, on the page. the individual accounts all work fine - they seem to be tracking data ok. the 'global' account is not working and this gives us the = Tracking Not Installed error. This has been going on since oct 10. So the wait 24/48/72 hours thing is waaaaay over. 2. GA Debug code. Installing GA Debug chrome extension gives the following output. I've tried to hide anything that could be considered secret. UA-XXXXX34-1 == Global account (which isn't working any more). UA-XXXXX34-11 == Specific account for www.website.com _gaq.push processing "_setAccount" for args: "[UA-XXXXX34-1]": ga_debug.js:18 _gaq.push processing "_setDomainName" for args: "[website.com]": ga_debug.js:18 _gaq.push processing "_setAllowLinker" for args: "[true]": ga_debug.js:18 _gaq.push processing "_trackPageview" for args: "[]": ga_debug.js:18 Track Pageview ga_debug.js:18 Tracking beacon sent! utmwv=--snipped-- Account ID : UA-XXXX234-1 Page Title : Some page title Host Name : www.website.com Page : / Referring URL : - Hit ID : 1923583969 Visitor ID : 785310647 Session Count : 51 Session Time - First : Thu Aug 23 2012 15:20:17 GMT 1000 (AUS Eastern Standard Time) Session Time - Last : Mon Oct 29 2012 11:41:46 GMT 1100 (AUS Eastern Summer Time) Session Time - Current : Mon Oct 29 2012 12:19:23 GMT 1100 (AUS Eastern Summer Time) Campaign Time : Thu Aug 23 2012 15:20:17 GMT 1000 (AUS Eastern Standard Time) Campaign Session : 1 Campaign Count : 1 Campaign Source : (direct) Campaign Medium : (none); Campaign Name : (direct) Language : en-gb Encoding : UTF-8 Flash Version : 11.4 r31 Java Enabled : true Screen Resolution : 1050x1680 Browser Size : 1033x861 Color Depth : 32-bit Ga.js Version : 5.3.7d Cachebuster : 1846514973 ga_debug.js:18 _gaq.push processing "_setAccount" for args: "[UA-XXXX234-11]": ga_debug.js:18 _gaq.push processing "_setDomainName" for args: "[website.com]": ga_debug.js:18 _gaq.push processing "_setAllowLinker" for args: "[true]": ga_debug.js:18 _gaq.push processing "_trackPageview" for args: "[]": ga_debug.js:18 Track Pageview ga_debug.js:18 Tracking beacon sent! utmwv=--snipped-- Account ID : UA-XXXX234-11 Page Title : SomePageTitle Host Name : www.website.com Page : / Referring URL : - Hit ID : 1923583969 Visitor ID : 785310647 Session Count : 51 Session Time - First : Thu Aug 23 2012 15:20:17 GMT 1000 (AUS Eastern Standard Time) Session Time - Last : Mon Oct 29 2012 11:41:46 GMT 1100 (AUS Eastern Summer Time) Session Time - Current : Mon Oct 29 2012 12:19:23 GMT 1100 (AUS Eastern Summer Time) Campaign Time : Thu Aug 23 2012 15:20:17 GMT 1000 (AUS Eastern Standard Time) Campaign Session : 1 Campaign Count : 1 Campaign Source : (direct) Campaign Medium : (none); Campaign Name : (direct) Language : en-gb Encoding : UTF-8 Flash Version : 11.4 r31 Java Enabled : true Screen Resolution : 1050x1680 Browser Size : 1033x861 Color Depth : 32-bit Ga.js Version : 5.3.7d Cachebuster : 1580443754 and this is the js code he have. BTW, it is inside a <head></head> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-XXXX234-1'], ['_setDomainName', 'website.com'], ['_setAllowLinker', true], ['_trackPageview'] ,['b._setAccount','UA-XXXX234-11'], ['b._setDomainName','website.com'], ['b._setAllowLinker',true], ['b._trackPageview'] ); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> Finally, I've triple checked that the UA is the correct text. and yes, the global account is -1 and the specific domain is -11. Anyone have any suggestions to help?

    Read the article

  • Google analytics not provided for 55% of total traffic

    - by Neolisk
    I've been here and here to learn what (not provided) means. Now the question is if what I am seeing in my Google Analytics stats for my website is considered normal (and whether I can/should do anything about it). Here are the statistics from one day, but other days are similar: 102 visits, 57 is from (not provided), that's over 55% of unknown keywords. Is it normal to have it like that? Does google plan to do anything about it? In other words, what's the perspective? In my understanding, with this approach, as people switch to https, Analytics will stop being useful. Please correct me if I am wrong in my assumptions.

    Read the article

  • Can I include a robots meta tag outside of the head in HTML snippets indeded to be SSIed?

    - by Dan
    I have a number of files in my site which are not intended for independent viewing, but rather to be AJAXed into content within the site. They obviously don't meet HTML standards (no body, head, etc.) as independent entities. I would like to prevent search engines from indexing these pages, but do not have access to /robots.txt (which would be much more ideal). My question is, could I include the following at the top of these partial HTML files and get the desired results? <meta name="robots" content="noindex, noarchive"> I guess there are two parts to this question. Will this cause any rendering issues in any browsers? Will search engines (at least Google & Bing) interpret this as intended?

    Read the article

  • XNA 2D vehicle wall collisions

    - by mike
    I am attempting to implement collisions for my truck game, where the truck can drive around the world and hit walls surrounding the level and various randomly placed walls within the level. I am able to get direct collisions working correctly. However, it is getting very complicated and tricky very quickly. I am trying to accommodate various other collisions such as when a truck is against the wall then turns an adjacent direction or when they reverse into a wall. Both of these result in a slight collision as the image of the truck flips around to the direction the player wants to move. All of this has resulted in a whole lot of if statements to check how I should be fixing the collision. This in turn makes the player jump to random locations and "teleport" around corners, etc. The rest of my game is fine, I am not completely new to game development or C# for that matter. It's just the logic of collisions. Any ideas on how I can approach this? Image of the collisions I am trying to resolve: http://tinypic.com/r/2qtflvq/6

    Read the article

  • Freelance composer seeking work! [closed]

    - by Ben Fowler
    Hey guys! I'm a freelance composer based in Victoria, Australia trying to break into the game industry to start my career! I've heard it said that having a plan B is planning for failure, so I've decided to go full on for what I want, so here I am! I have composed some music for other games, none of which have made it in yet (still hopeful :P) Any help on how I can break into to game industry as a composer would be MUCH appreciated!

    Read the article

  • XNA Drag Gestures - fractional delta values

    - by Den
    I have an issue with objects moving roughly twice as far as expected when dragging them. I am comparing my application to the standard TouchGestureSample sample from MSDN. For some reason in my application gesture samples have fractional positions and deltas. Both are using same Microsoft.Xna.Framework.Input.Touch.dll, v4.0.30319. I am running both apps using standard Windows Phone Emulator. I am setting my break point immediately after this line of code in a simple Update method: GestureSample gesture = TouchPanel.ReadGesture(); Typical values in my app: Delta = {X:-13.56522 Y:4.166667} Position = {X:184.6956 Y:417.7083} Typical values in sample app: Delta = {X:7 Y:16} Position = {X:497 Y:244} Have anyone seen this issue? Does anyone have any suggestions? Thank you.

    Read the article

  • Jboss 5.1.0: java.lang.LinkageError: loader constraint violation for class javax.sql.DataSource

    - by lawrencexu
    have read quite a lot about this error, the reason is 1) more than one jar containing this class have been include into the classpath, 2)include the jar twice or more, but in my case, this class is jdk class, and I have search no this class have been found under my application. any clue would be very helpful. exception stack: 2012-10-31 14:09:58,319 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (http-0.0.0.0-8080-1:) Unexpected error during load of:javax.sql.DataSource java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568) at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135) at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131) at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455) at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267) at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:287) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1163) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862) at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502) at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getBranchesByAgreementId(UmbrellaNettingFundsSearch.java:199) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.buildConditionOfPrinAndCpty(UmbrellaNettingFundsSearch.java:177) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getFunds(UmbrellaNettingFundsSearch.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.lombardrisk.webgui.filter.ValidRequestFilter.doFilter(ValidRequestFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74) at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662)

    Read the article

  • MySQL, PHP, How Many in GROUP

    - by 0Neji
    I'm trying to create a table which outputs a list of users and how many times they've logged in. A new row in the table is created every time that someone logs in so there is multiple rows for one user. Now, I'm trying using the following statement to pull the data out: SELECT * FROM logins GROUP BY user ORDER BY timestamp DESC Which is working fine but now there is a column in my HTML table which should show how many times the user has logged in. How do I go about counting the amount of rows in each group?

    Read the article

  • Tweaking rendering of thumbnail images in galleria

    - by saket
    I am working on the classic theme of Galleria to display a gallery. Here the requirement is to display the thumbnails in two row with the images in following order with a horizontal scroller if the thumbnails list div width increases more than 24. 1 3 5 7 9 11 13 15 17 19 21 23 .. 2 4 6 8 10 12 14 16 18 20 22 24 .. For if the images are less than 24 and more than 12 then the order should be rendered in two rows as :- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .. For if the images is less than 12 the images should be rendered in a single row as :- 1 2 3 4 5 6 7... Presently what I have done is I am using css3 column property to do this using different classes on the basis of image counts. This is working in all browsers but in IE8. So, is there any substitute for css3 column property for IE8 or less. Or some better way to implement the stuff that works fine in IE as well.

    Read the article

  • Stack trace method names redacted

    - by c.cam108
    I have users email me stack traces when my app crashes on their device. Prior to iOS 6 they looked like this: CRASH: NSInvalidArgumentException (*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil) TRACE: ( 0 CoreFoundation 0x355e58a7 __exceptionPreprocess + 186 1 libobjc.A.dylib 0x3798c259 objc_exception_throw + 32 2 CoreFoundation 0x3553a1d7 -[__NSArrayM insertObject:atIndex:] + 186 3 MYAPP 0x0006c0f7 MYAPP + 188663 4 MYAPP 0x000652a3 MYAPP + 160419 5 Foundation 0x3512ac29 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 16 6 Foundation 0x350826d9 -[NSURLConnectionInternalConnection invokeForDelegate:] + 28 7 Foundation 0x350826a3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198 8 Foundation 0x350825c5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60 9 CFNetwork 0x34de77f5 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 192 10 CFNetwork 0x34ddc4a5 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 424 11 CFNetwork 0x34ddc1a3 _ZN19URLConnectionClient13processEventsEv + 106 12 CFNetwork 0x34ddc0d9 _ZN17MultiplexerSource7performEv + 156 13 CoreFoundation 0x355b9ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 14 CoreFoundation 0x355b929f __CFRunLoopDoSources0 + 214 15 CoreFoundation 0x355b8045 __CFRunLoopRun + 652 16 CoreFoundation 0x3553b4a5 CFRunLoopRunSpecific + 300 17 CoreFoundation 0x3553b36d CFRunLoopRunInMode + 104 18 GraphicsServices 0x371d7439 GSEventRunModal + 136 19 UIKit 0x33047cd5 UIApplicationMain + 1080 20 MYAPP 0x0003fbcf MYAPP + 7119 21 MYAPP 0x0003fb84 MYAPP + 7044 ) From the CoreFoundation etc method names and asking the user what happened, I can get a pretty good idea of where the crash happened. However, since iOS 6 was released, my crash reports all look like this: CRASH: NSRangeException (*** -[__NSArrayI objectAtIndex:]: index 2147483670 beyond bounds [0 .. 11]) TRACE: ( 0 CoreFoundation 0x3a3872bb <redacted> + 186 1 libobjc.A.dylib 0x32ca697f objc_exception_throw + 30 2 CoreFoundation 0x3a2d1e8d <redacted> + 164 3 MYAPP 0x000ff721 MYAPP + 214817 4 MYAPP 0x000e8999 MYAPP + 121241 5 UIKit 0x372f60ad <redacted> + 72 6 UIKit 0x372f605f <redacted> + 30 7 UIKit 0x372f603d <redacted> + 44 8 UIKit 0x372f58f3 <redacted> + 502 9 UIKit 0x372e1287 <redacted> + 526 10 UIKit 0x37373f3d <redacted> + 748 11 UIKit 0x3721e52b <redacted> + 318 12 UIKit 0x3720b809 <redacted> + 380 13 UIKit 0x3720b123 <redacted> + 6154 14 GraphicsServices 0x362085a3 <redacted> + 590 15 GraphicsServices 0x362081d3 <redacted> + 34 16 CoreFoundation 0x3a35c173 <redacted> + 34 17 CoreFoundation 0x3a35c117 <redacted> + 138 18 CoreFoundation 0x3a35af99 <redacted> + 1384 19 CoreFoundation 0x3a2cdebd CFRunLoopRunSpecific + 356 20 CoreFoundation 0x3a2cdd49 CFRunLoopRunInMode + 104 21 GraphicsServices 0x362072eb GSEventRunModal + 74 22 UIKit 0x3725f301 UIApplicationMain + 1120 23 MYAPP 0x000ccbd3 MYAPP + 7123 24 MYAPP 0x000ccb88 MYAPP + 7048 ) I get the stack trace from here, which the user is prompted to email when the app is re-opened: void uncaughtExceptionHandler(NSException *exception) { //make a file name to write the data to using the documents directory: NSString *fileName = [NSString stringWithFormat:@"%@/crashlog.txt", documentsDirectory]; //create content - four lines of text NSString *content = [NSString stringWithFormat:@"CRASH: %@ (%@)\n\nTRACE: %@", [exception name], [exception reason], [exception callStackSymbols]]; //save content to the documents directory [content writeToFile:fileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil]; } Without the method names, this is worse than useless. Is there any way of getting these method names back into my stack traces? This is a release configuration, not debug.

    Read the article

  • Join with table and sub query in oracle

    - by Amandeep
    I dont understand what is wrong with this query it is giving me compile time error of command not ended properly.The inner query is giving me 4 records can any body help me out. select WGN3EVENTPARTICIPANT.EVENTUID from (Select WGN_V_ADDRESS_1.ADDRESSUID1 as add1, WGN_V_ADDRESS_1.ADDRESSUID2 as add2 from WGN3USER inner join WGN_V_ADDRESS_1 on WGN_V_ADDRESS_1.USERID=wgn3user.USERID where WGN3USER.USERNAME='FIRMWIDE\khuraj' ) as ta ,WGN3EVENTPARTICIPANT where (ta.ADDRESSUID1=WGN3EVENTPARTICIPANT.ADDRESSUID1) AND (ta.ADDRESSUID2=WGN3EVENTPARTICIPANT.ADDRESSUID2) I am running it in oracle. Thanks Amandeep

    Read the article

  • Intent.getInt() doesn't work on ICS, but works on JB

    - by ObAt
    I use this code to send parameters when I start a new Activity: Intent inputForm = new Intent(getActivity(), InputForm.class); Bundle b = new Bundle(); b.putInt("item", Integer.parseInt(mItem.id)); //Your id inputForm.putExtras(b); //Put your id to your next Intent startActivity(inputForm); And I use this code for reading the parameters in the inputForm Activity: Bundle b = getIntent().getExtras(); if (b != null) { int value = b.getInt("item"); ID = value; } Toast.makeText(getApplication(), "MIJN ID:" + Integer.toString(ID), Toast.LENGTH_LONG).show(); When I run this code on my Samsung Tab 10.1 GT-P7510 ID is alsways 0, when I run the same code on my Galaxy S3 with JB the code just works fine. Can someone help me? Thanks in advance, ObAt

    Read the article

  • How to understand the functional programming code for converting IP string to a number?

    - by zfz
    In a python discusion, I saw a way to convert IP string to a integer in functional progamming way. Here is the Link . The function is implemented in a single line. def ipnumber(ip): return reduce(lambda sum, chunk: sum <<8 | chunk, map(int, ip.split("."))) However, I have few ideas of funcional programming. Could anybody explain the function in detail? I've some knowledg of "map" and "reduce". But I don't konw what "|" and "chunk" mean here? Thanks.

    Read the article

  • Why does local variable names take precedence over function names in JavaScripts?

    - by fredrik
    In JavaScript you can define function in a bunch of different ways: function BatmanController () { } var BatmanController = function () { } // If you want to be EVIL eval("function BatmanController () {}"); // If you are fancy (function () { function BatmanController () { } }()); By accident I ran across a unexpected behaviour today. When declaring a local variable (in the fancy way) with the same name as function the local variable takes presence inside the local scope. For example: (function () { "use strict"; function BatmanController () { } console.log(typeof BatmanController); // outputs "function" var RobinController = function () { } console.log(typeof RobinController); // outputs "function" var JokerController = 1; function JokerController () { } console.log(typeof JokerController); // outputs "number", Ehm what? }()); Anyone know why var JokerController isn't overwritten by function JokerController? I tested this in Chrome, Safari, Canary, Firefox. I would guess it's due to some "look ahead" JavaScript optimizing done in the V8 and JägerMonkey engines. But is there any technical explanation to explain this behaviour?

    Read the article

  • jqGrid multiplesearch - How do I add and/or column for each row?

    - by jimasp
    I have a jqGrid multiple search dialog as below: (Note the first empty td in each row). What I want is a search grid like this (below), where: The first td is filled in with "and/or" accordingly. The corresponding search filters are also built that way. The empty td is there by default, so I assume that this is a standard jqGrid feature that I can turn on, but I can't seem to find it in the docs. My code looks like this: <script type="text/javascript"> $(document).ready(function () { var lastSel; var pageSize = 10; // the initial pageSize $("#grid").jqGrid({ url: '/Ajax/GetJqGridActivities', editurl: '/Ajax/UpdateJqGridActivities', datatype: "json", colNames: [ 'Id', 'Description', 'Progress', 'Actual Start', 'Actual End', 'Status', 'Scheduled Start', 'Scheduled End' ], colModel: [ { name: 'Id', index: 'Id', searchoptions: { sopt: ['eq', 'ne']} }, { name: 'Description', index: 'Description', searchoptions: { sopt: ['eq', 'ne']} }, { name: 'Progress', index: 'Progress', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ActualStart', index: 'ActualStart', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ActualEnd', index: 'ActualEnd', editable: true, searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'Status', index: 'Status.Name', editable: true, searchoptions: { sopt: ['eq', 'ne']} }, { name: 'ScheduledStart', index: 'ScheduledStart', searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} }, { name: 'ScheduledEnd', index: 'ScheduledEnd', searchoptions: { sopt: ['eq', 'ne', "gt", "ge", "lt", "le"]} } ], jsonReader: { root: 'rows', id: 'Id', repeatitems: false }, rowNum: pageSize, // this is the pageSize rowList: [pageSize, 50, 100], pager: '#pager', sortname: 'Id', autowidth: true, shrinkToFit: false, viewrecords: true, sortorder: "desc", caption: "JSON Example", onSelectRow: function (id) { if (id && id !== lastSel) { $('#grid').jqGrid('restoreRow', lastSel); $('#grid').jqGrid('editRow', id, true); lastSel = id; } } }); // change the options (called via searchoptions) var updateGroupOpText = function ($form) { $('select.opsel option[value="AND"]', $form[0]).text('and'); $('select.opsel option[value="OR"]', $form[0]).text('or'); $('select.opsel', $form[0]).trigger('change'); }; // $(window).bind('resize', function() { // ("#grid").setGridWidth($(window).width()); //}).trigger('resize'); // paging bar settings (inc. buttons) // and advanced search $("#grid").jqGrid('navGrid', '#pager', { edit: true, add: false, del: false }, // buttons {}, // edit option - these are ordered params! {}, // add options {}, // del options {closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, onInitializeSearch: updateGroupOpText, afterRedraw: updateGroupOpText}, // search options {} ); // TODO: work out how to use global $.ajaxSetup instead $('#grid').ajaxError(function (e, jqxhr, settings, exception) { var str = "Ajax Error!\n\n"; if (jqxhr.status === 0) { str += 'Not connect.\n Verify Network.'; } else if (jqxhr.status == 404) { str += 'Requested page not found. [404]'; } else if (jqxhr.status == 500) { str += 'Internal Server Error [500].'; } else if (exception === 'parsererror') { str += 'Requested JSON parse failed.'; } else if (exception === 'timeout') { str += 'Time out error.'; } else if (exception === 'abort') { str += 'Ajax request aborted.'; } else { str += 'Uncaught Error.\n' + jqxhr.responseText; } alert(str); }); $("#grid").jqGrid('bindKeys'); $("#grid").jqGrid('inlineNav', "#grid"); }); </script> <table id="grid"/> <div id="pager"/>

    Read the article

  • WPF options classic theme

    - by ProgrammerAtWork
    I have the following resources XML in my grid: <Grid.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/PresentationFramework.Classic;component/themes/classic.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Grid.Resources> And this works, I load in the classic theme. But the classic theme button backgrounds are very white? Is there any way I can change the default background color of buttons in this theme?

    Read the article

  • In query in Entity Frame work

    - by Syed Salman Raza Zaidi
    I am working on Entity frame work, i have created a method which is returning List of my Table, I am retrieving data on base of grpID(which is foreign key, so i can have multiple records) I have saved these grpID's in an array so I want to run IN command on Entity framework so that i can get records in single List, How can i apply In command,my code is below public List<tblResource> GetResources(long[] grpid) { try { return dataContext.tblResource.Where(c => c.GroupId == grpid && c.IsActive == true).ToList();//This code is not working as i am having array of groupIds } catch (Exception ex) { return ex; } }

    Read the article

  • Run script after Jquery finish

    - by Felipe Fernández
    First let's explain the hack that I was trying to implement. When using Total Validator Tool through my web page and I get following error: [WCAG v1 6.3 (A), US-508-l] Consider providing a alternative after each tag As my page relies heavily on javascript I can't provide a real alternative, so I decided to add an empty noscript tag after every script appearence. Let's say I need to provide a clean report about accesibility about my web page even the hack is senseless. (I know the hack is unethical and silly, let's use it as example material, but the point of my post are the final questions) I tried the following approach: $(document).ready(function(){ $("script").each(function() { $(this).after("<noscript></noscript>"); }); }); The problem raises because I have a jQueryUI DatePicker component on my page. jQuery adds a script section after the DOM is ready so my hack fails as miss this section. So the questions are: How handles jQuery library to be executed after document is ready? How can I run my code after jQuery finish its labours?

    Read the article

  • To make the drawn text clear

    - by user1758835
    I have written the code to draw text on the image and to save the image,But the text which I am drawing is looking blur on the image.What modifications need to do to make it clear,Or if there is any other way to draw text on image in android Canvas canvas = new Canvas(photo); Typeface tf = Typeface.create(topaste, Typeface.BOLD); Paint paint = new Paint(); paint.setStyle(Style.FILL); paint.setTypeface(tf); paint.setColor(Color.WHITE); paint.setStrokeWidth(12); canvas.drawBitmap(photo, 0, 0, paint); canvas.drawText(topaste, 15, 120, paint); image.setImageBitmap(photo);

    Read the article

  • Websql to google maps markers

    - by Roy van Neden
    I am busy with my web application for a school project. It has has two pages. The first page uploads the location(latitude and longitude), price, date and kind of fuel. It works and i saved it with websql.(see screenshot) Now i want to get everything out of the web database and put it as a marker on my google maps card. I have my own location already. But i dont know how to get everything from the database to the map as a marker. I'm using jquery mobile/html5/css/javascript only. Code to put it in a array or something else that will work. db.transaction(function(tx){ tx.executeSql('SELECT brandstofsoort, literprijs, datum, latitude, longitude FROM brandstofstatus', [], function (tx, results) { var lengte = results.rows.length, i; for(var i = 0; i< lengte; i++){ var locations = [ [ ], [ ], [ ], [ ], [ ] ]; } // / for loop });// /tx.executeSql });// /db.transaction Thanks in advance!

    Read the article

  • Error about TypeError (wrong argument type Module (expected Class)): app/controllers/player_profiles_controller.rb:1:in `<top (required)>'

    - by edi susanto
    hy guys . . im new at this . . sorry for the word that's not understandable and the easy question . . i'd like to ask about an error that shown below : TypeError (wrong argument type Module (expected Class)): app/controllers/player_profiles_controller.rb:1:in `' i want to test the result by render json in soapUI. does anyone know what's the problem so that the error will show up like above ? thanks before.regards,edy

    Read the article

  • Catching error caused by InitialContext.lookup

    - by Martin Schröder
    I'm developing a command line client (Java SE6) that now needs to talk to a Glassfish 2.1 server. The code for setting up this connection is try { final InitialContext context = new InitialContext(); final String ejbName = GeneratorCancelledRemote.class.getName(); generatorCancelled = (GeneratorCancelledRemote) context.lookup(ejbName); } catch (Throwable t) { System.err.println("--> Could not call server:"); t.printStackTrace(System.err); runWithOutEJB = true; } I'm now testing it without a running server and the client (when run from Eclipse 4.2) just bombs with 31.10.2012 10:40:09 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700" org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2783) at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2804) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:261) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:274) at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:184) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:328) at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112) at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69) at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:134) at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259) at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204) at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.werkii.latex.generator.Generator.main(Generator.java:344) Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347) at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.(SocketOrChannelConnectionImpl.java:244) ... 14 more Caused by: java.net.ConnectException: Connection refused: connect at sun.nio.ch.Net.connect(Native Method) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532) at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105) at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332) ... 15 more It's o.k. for now (while I'm still in development) that it bombs, but it does this repeatedly and the catch clause is never reached (even though I'm catching Throwable) - the message is not printed. So how can I handle connection errors during lookup in my program?

    Read the article

  • C struct print, decode this code?

    - by pauliwago
    I am in the process of studying for a test, and I'm trying to work through some practice problems. I've been working on this a while now..but can't figure it out. Please take a look at the code fragment: union { int i; short x; unsigned short u; float f; } testout; testout.i=0xC0208000; Before I ask the question, can someone please explain to me how the above code works?? My guess is that testout.i=0xC0208000 puts either an int, short, unsigned short, or float and puts the result in that address. (?) The question is what prints out if we write printf("%d", testout.x)? I know we should expect digits....but I have no idea where they are getting the digits from....there is no output. Any explanation would be greatly appreciated. Thanks!

    Read the article

  • Looking for a specific python gui module to perform the following task

    - by Sadaf Amouz
    I am looking for a GUI python module that is best suited for the following job: I am trying to plot a graph with many columns (perhaps hundreds), each column representing an individual. The user should be able to drag the columns around and drop them onto different columns to switch the two. Also, there are going to be additional dots drawn on the columns and by hovering over those dots, the user should see the values corresponding to those dots. What is the best way to approach this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >