Daily Archives

Articles indexed Friday May 7 2010

Page 11/110 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to fetch distinct values in Core Data?

    - by Andy
    So in looking through Core Data Snippets, I found the following code: ... [request setEntity:entity]; [request setResultType:NSDictionaryResultType]; [request setReturnsDistinctValues:YES]; [request setPropertiesToFetch:[NSArray arrayWithObject:@"<#Attribute name#>"]]; // Execute the fetch NSError *error; id requestedValue = nil; // WTF? This isn't defined or used anywhere NSArray *objects = [managedObjectContext executeFetchRequest:request error:&error]; if (objects == nil) { // handle the error } This is great and seems perfect for what I need...but how does one actually use it? I assume since it's returning dictionaries, I need a key to get at the values - but where's the key defined? Is that the "id requestedValue = nil" line? If so, how does "requestedValue" become the key? Xcode gives me a compiler warning about an unused variable at the "requestedValue" declaration. I feel like I'm missing something here. Thanks in advance for any assistance you can offer.

    Read the article

  • Checking only "Automatic" services with powershell.

    - by Lee
    I've seen lots of scripts out there for manually stopping/starting services in a list, but how can I generate that list programatically of -just- the automatic services. I want to script some reboots, and am looking for a way to verify that everything did in fact start up correctly for any services that were supposed to.

    Read the article

  • Configure Raid On Red Hat 5

    - by Sopolin
    Hi all, I have a problem with configure raid on red hat enterprise linux. The problem is when I create raid on two hard disks. It works successfully but after I remove one hard disk. It works normally. It means that I plug in one hard disk for testing configure raid. But after that I put both hard disks and create other file. The raid is cleared. My question is: Why do I turn off server machine, it clears raid that I configure first time before I turn off? Could anyone help to solve this problem? Thank, Ung Sopolin

    Read the article

  • Filter condition not working properly on list (C#3.0)

    - by Newbie
    I have a datatable that has many NULL or " " strings. Next I am type casting the DataTable to a list . Now if I want to filter those conditions on this list and get the resultant value(without NULL or String.Empty or " " records) what should I do? My code DataTableExtensions.AsEnumerable(dt).ToList().ForEach(i => { if (i[0] != null) { if ((i[0].ToString() != string.Empty)|| (i[0].ToString() != " ")) { list = dt.AsEnumerable().ToList(); } } }); But I am getting all the records. It is not getting filtered. Using C#3.0 Please help Thanks

    Read the article

  • Any really modern, good-looking desktop apps that are developed with PyQt/PySide?

    - by Edwin
    Hi, I have started using Python for web development recently, it's kinda cool; I have seen programs that are developed in QT/C++, which is good enough in terms of esthetics; I have just noticed the new PySide project (which brings LGPL Qt license to Python and it doesn't support Windows yet). In view of the above, I see the possibility of using Python + PyQt/PySide to develop cross platform apps in the future :) but I have several doubts right now: Can PyQty/PySide be used to develop really complex/modern UI? Can somebody give me some points to have a look at some nice-looking screenshots of apps that are developed in Python+QT? What about the performance? Thanks in advance!

    Read the article

  • "Debug Assertion" Runtime Error on VS2008?

    - by Linda Cohen
    I' writing a C++ MFC program on VS2008 and I'm getting this "Debug Assertion Error" when I first run the program sometimes. When I try to debug it, it takes me to this winhand.cpp file which is not part of the program I wrote so I'm not sure how to debug this. It takes the error to this place in winhand.cpp CObject* pTemp = LookupTemporary(h); if (pTemp != NULL) { // temporary objects must have correct handle values HANDLE* ph = (HANDLE*)((BYTE*)pTemp + m_nOffset); // after CObject ASSERT(ph[0] == h || ph[0] == NULL); if (m_nHandles == 2) ASSERT(ph[1] == h); } So why does this error happen? Why does it only happen sometimes (50% of the time)? How would I debug this? I'll provide some code if is needed. THANKS!

    Read the article

  • Is a function kind of like a static method?

    - by lkm
    I'm a java programmer and am trying to understand the difference between a method (java methods) and a function (such as in c++). I used to think that they are the same, just different naming conventions for different programming languages. But now that I know they are not, I am having trouble understanding the difference. I know that a method relates to an instance of a class and has access to class data (member variables), while a function does not (?). So is a function kind of like a static method? See here for explanations I read which led me to think this.

    Read the article

  • Creating a process in a non-zero session from a service in windows-2008-server?

    - by Itay Levin
    Hi, I was wondering if there is a simple way for a service to create a process in user session? My service is running as a user(administrator) account and not as a LocalSystem acount, therefore i can't use the WTSQueryUserToken function. i have tried calling OpenProcessToken(GetCurrentProcess,TOKEN_ALL_ACCESS,TokenHandle); but when i use this token to run CreateProcessAsUser(TokenHandle,.....) my process is still running in session 0. how can i resolve this issue? I'm using an Ole automation so i don't really care on which session the process will be running on, as long it is not the session 0 - because the Ole from some reason doesn't create its processes (winword.exe for instance) in session 0, but rather it creates them in other user sessions. Any suggestions will be welcome. Thanks in advance.

    Read the article

  • Classnotfound exception while running hadoop

    - by vana
    Hi, I am new to hadoop. I have a file Wordcount.java which refers hadoop.jar and stanford-parser.jar I am running the following commnad javac -classpath .:hadoop-0.20.1-core.jar:stanford-parser.jar -d ep WordCount.java jar cvf ep.jar -C ep . bin/hadoop jar ep.jar WordCount gutenburg gutenburg1 After executing i am getting the following error: lang.ClassNotFoundException: edu.stanford.nlp.parser.lexparser.LexicalizedParser The class is in stanford-parser.jar ... What can be the possible problem? Thanks

    Read the article

  • Experience with protecting PHP code

    - by Alec Smart
    Hello, I am aware of that there are a number of code obfuscators/licensing programs for PHP. I wanted to know if anyone has actually used these and what their experience has been. Please note I do not want to know the solutions available. I want to know your experience using one of these solutions. Is it worth investing say 200$ purchasing a code obfuscator etc? I honestly would prefer something that does not have a loader etc. I know that it increases the chances of cracking, but I only want it to be a detrimental factor for them. Thank you for your time.

    Read the article

  • Reslet with GWT and Tomcat Error

    - by Holograham
    I am getting this error on startup I am using GWT 2.0.3 and Reslet RC3 type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet adapter threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:619) root cause java.lang.NoSuchMethodError: org.restlet.Client.handle(Lorg/restlet/Request;)Lorg/restlet/Response; org.restlet.ext.servlet.ServerServlet.createComponent(ServerServlet.java:423) org.restlet.ext.servlet.ServerServlet.getComponent(ServerServlet.java:763) org.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:881) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:619) My web XML is as follows: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <context-param> <param-name>org.restlet.clients</param-name> <param-value>CLAP FILE WAR</param-value> </context-param> <servlet> <servlet-name>adapter</servlet-name> <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class> <init-param> <param-name>org.restlet.application</param-name> <param-value>com.tdc.Propspace.server.TestServerApplication</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>adapter</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app> Any ideas what would cause this?

    Read the article

  • Algorithms or OO stuff or new technology

    - by Prashant
    I am trying to learn new stuff about jquery, html, asp .net mvc. I see two school of thoughts - Those who use oo concepts a lot and stress on more object oriented approach Those who rely heavily on algorithms and say a particular problem should take o(n) etc. I am not sure where to spend more time ? . Should I spend more time learning OO stuff or learn new stuff like jquery etc or learn travelling sales man algorithm etc ?

    Read the article

  • MSDN Radio: SharePoint 2010 for Developers

    When Microsoft SharePoint Server 2010 is released, it will offer new tools that make customizing and extending your applications much easier. Join us as we talk with Steve Fox, a Senior Evangelism Manager with the Developer and Platform Evangelism team. We'll explore the tools, what's possible, and take your questions....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Announcing Microsoft Web Camps - a Free Opportunity to Learn From the Experts

    Microsoft Web Camps are free, two-day events where you can learn about the latest components of the Microsoft Web Platform, work with hands-on labs, build solutions in teams and have direct interaction with Microsoft experts. Technologies covered include ASP.NET, Visual Studio, IIS, and more....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Time Capsule Refuses to Connect After Interrupted File Transfer

    - by Steve Stifler
    I have a first generation Apple Time Capsule set up as a NAS on my network. I use the built-in hard drive for Time Machine backups, with a 1.5 TB external HDD attached to the Time Capsule over USB. Whenever I cancel a file transfer from the external drive to my Macbook (or quit a video I had been streaming from it, as was the most recent incident), I can no longer connect to the Time Capsule or the attached drive, and I have to unplug it to get it working again. How can I fix this? Is it a network error? Could the Time Capsule be at fault or could it be my computer?

    Read the article

  • Silverlight 3 - Creating Custom Objects inside a Merged ResourceDictionary

    - by Tony Heupel
    I have custom classes that I currently instantiate within App.xaml as resources. I want to move these custom objects into a Merged ResourceDictionary, where they are used within styles, and keep them close to where they are used. Here's an example of what I want, arbitrarily using fake converter objects, but they could be any custom object... App.xaml (namespace declarations ommitted): <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Merged.xaml" /> </ResourceDictionary.MergedDictionaries> <Style x:Key="SomeStyle" TargetType="SomeControl"> ... </Style> ... </ResourceDictionary> And then in Merged.xaml (namespace declarations omitted): <ResourceDictionary> <cvt:VisibilityToBoolConverter x:Key="BoolToVisibility" Inverted="True"/> <cvt:VisibilityToBoolConverter x:Key="NotBoolToVisibility" Inverted="True" Not="True"/> <Style x:Key="SomethingThatUsesVisibilityToBoolConvertersStyle" TargetType="SomeOtherControl"> .... </Style> </ResourceDictionary> The issue I'm seeing is this: when I create the BoolToVisibility and NotBoolToVisibility objects (as well instantiating other objects that are instances of custom classes I have created) just as part Application.Resources, they are created and all the references work as expected; however, when I move these into a Merged Resource Dictionary (as I have in the sample above), I get a malformed Application exception when the Silverlight application loads. I belive this to be an issue with how objects are instantiated differently in Merged Resource Dictionaries (I belive it is more of a lazy-load approach), but I would expect it to work nonetheless. I am very much able to add Style objects, DataTemplates, ControlTemplates, and the like. But when I want to create instances of custom classes that are named or keyed using Xaml, it works great inside of App.xaml's Application.Resources directly and Application.Resources/ResourceDictionary as well. As soon as they are moved into a merged dictionary, it throws the exception. Is this by design? Any other ideas that work? Thanks in advance...

    Read the article

  • problem with pathForResource

    - by mr.octobor
    HI all I have problem with NSString *filePaht = [[NSBundle mainBundle] pathForResource:(NSString *)name ofType:(NSString *)ext]; if I used NSString *filePaht = [[NSBundle mainBundle] pathForResource:@"soundName" ofType:@"aiff"]; it's OK but when I used NSString *fileName = [[file.list objectAtIndex:index] objectForKey:@"soundName"]; NSString *filePaht = [[NSBundle mainBundle] pathForResource:fileName ofType:@"aiff"]; It's not work have any idea !? Thanks

    Read the article

  • HOw to make image stay inside the div box on scrolling

    - by Mirage
    I have the image position fixed inside div and code is gven below #content{ margin-top:100px; width:900px; color:#009; border:1px solid red; overflow:hidden; display:block; } img { float:left; position:fixed; top:140px; padding:50px; } #text{ display:block; border:1px solid green; width:500px; height:1200px; float:right; overflow:scroll; } #footer{ clear:both; width:600px; height:300px; border:2x solid blue; color:#939; } HTML is <div id="content" > <img src="bar.jpg" width="46" height="639" /> <div id="text"> ggggggggggggggggggfgdfgdfgdgdfgdgdfgdf </div> </div> <div id="footer"> Footer text </div> </body> Now when i scroll down then image comes out of the content div box. IS there any way so that even if i scroll the image bar should stay inside the div box. The screen shot shows my problem First Screen is ok without scrolling But when i scroll the text full then it covers my footer as well

    Read the article

  • Extract all text from a HTML page without losing context

    - by grmbl
    For a translation program I am trying to get a 95% accurate text from a HTML file in order to translate the sentences and links. For example: <div><a href="stack">Overflow</a> <span>Texts <b>go</b> here</span></div> Should give me 2 results to translate: Overflow Texts <b>go</b> here Any suggestions or commercial packages available for this problem?

    Read the article

  • Setting minimum size limit for a window in java swing

    - by shadyabhi
    I have a JFrame which has 3 JPanels in GridBagLayout.. Now, when I minimize a windows, after a certain limit, the third JPanel tends to disappear. I tried setting minimizing size of JFrame using setMinimumSize(new Dimension(int,int)) but no success. The windows can still be minimized. So, I actually want to make a threshhold, that my window cannot be minimized after a certain limit. How can I do so? Code:- import java.awt.Dimension; import javax.swing.JFrame; public class JFrameExample { public static void main(String[] args) { JFrame frame = new JFrame("Hello World"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setMinimumSize(new Dimension(400, 400)); frame.setVisible(true); } } Also: shadyabhi@shadyabhi-desktop:~/java$ java --showversion java version "1.5.0" gij (GNU libgcj) version 4.4.1 Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Usage: gij [OPTION] ... CLASS [ARGS] ... to invoke CLASS.main, or gij -jar [OPTION] ... JARFILE [ARGS] ... to execute a jar file Try `gij --help' for more information. shadyabhi@shadyabhi-desktop:~/java$ Gives me output like

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >