Search Results

Search found 8189 results on 328 pages for 'fedora 16'.

Page 197/328 | < Previous Page | 193 194 195 196 197 198 199 200 201 202 203 204  | Next Page >

  • Objective-C: when does an assigned object get deallocated

    - by Stefan Klumpp
    If I have a instance method and within this method I do something like this: NSString *peopleString = [peopleList componentsJoinedByString: @", "]; ... UILabel *likeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16.0+6.0f, 4.0f, 252.0f, 12.0f)]; [likeLabel setText:peopleString]; [likeLabel setFont:[UIFont fontWithName:@"Arial" size:12]]; [likeRow addSubview:likeLabel]; [likeLabel release]; The componentsJoinedByString doesn't contain a new, copy or alloc, thus I don't have to release it. What I'm wondering though is, when my peopleString gets deallocated. Might it happen to early? Meaning, before I can set the text in my label. Should I better use a [[NSString alloc] initWithString:[peopleList componentsJoinedByString: @", "]]; and release it at the end of this method?

    Read the article

  • ssis package from SQL agent failed

    - by Pramodtech
    I have simple package which reads data from csv file and loads into SQL table. File is located on another server and it is shared. I use UNC path in package. package is scheduled using sql agent job. Job worked fine for 1 week and suddenly started giving error "The file name "\\124.0.48.173\basel2\Commercial\Input\ACBS_GSU.csv" specified in the connection was not valid. End Error Error: 2010-04-20 16:15:07.19 Code: 0xC0202070 Source: ACBS_GSU Connection manager "CSV file conection" Description: Connection "CSV file conection" failed validation." Any help will be appreciated.

    Read the article

  • c++ : list(vector) definition with array

    - by Meloun
    I have Class Email, there is parameter "bcc" in her construktor. Its actually list of emails for copies. There is no fixed number of these emails and later i have to have possibility to extend this list. //construktor prototype Email::Email(vector<string> bcc) So i want to use type vector or list for that and function push_back(). How can i make a new instance with bcc emails? I need actually declaration with definition for my list. I've found this definition with iterator for integer type: int myints[] = {16,2,77,29}; Email myEmail(vector<int> (myints, myints + sizeof(myints) / sizeof(int) )); , but its not very user friend and i need it with strings. Is there something like this? Email myEmail(vector<string> ("first","second","third"));

    Read the article

  • What's the most effective way to interpolate between two colors? (pseudocode and bitwise ops expecte

    - by navand
    Making a Blackberry app, want a Gradient class. What's the most effective way (as in, speed and battery life) to interpolate two colors? Please be specific. // Java, of course int c1 = 0xFFAA0055 // color 1, ARGB int c2 = 0xFF00CCFF // color 2, ARGB float st = 0 // the current step in the interpolation, between 0 and 1 /* Help from here on. Should I separate each channel of each color, convert them to decimal and interpolate? Is there a simpler way? interpolatedChannel = red1+((red2-red1)*st) interpolatedChannel = interpolatedChannel.toString(16) ^ Is this the right thing to do? If speed and effectiveness is important in a mobile app, should I use bitwise operations? Help me! */

    Read the article

  • Matching an IP address with an IP range?

    - by Legend
    I have a MySQL table setup as follows: +---------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+-------------+------+-----+---------+----------------+ | ipaddress_s | varchar(15) | YES | MUL | NULL | | | ipaddress_e | varchar(16) | YES | | NULL | | +---------------+-------------+------+-----+---------+----------------+ where, ipaddress_s and ipaddress_e look something like: 4.100.159.0-4.100.159.255 Now is there a way I can actually get the row that contains a given IP address? For instance, given the IP address: "4.100.159.5", I want the above row to be returned. So I am trying for a query that looks something like this (but of course this is wrong because in the following I am considering IPs as strings): SELECT * FROM ranges WHERE ipaddress_s<"4.100.159.5" AND ipaddress_e>"4.100.159.5" Any suggestions?

    Read the article

  • jQuery each function, getting the data out of it

    - by Ankur
    I am trying to use the jQuery each function (line 5) to display the results of an AJAX call. when I write resultObj.value on line 6 how come I am not getting any data? Am I making a syntax error (I am pretty sure that I must be)? success : function(resultObj) { count = count+1; $(".objHolder").filter("#"+id).append("<table border='1' cellspacing='4' cellpadding='4' class='preTable' id='"+id+"' level='"+count+"'><tr><td class='preItem' id='"+id+"' level='"+count+"'><img src='images/right.jpg' width='16' height='10' /></td><td class='preList'>&nbsp;</td><td class='preHolder' level='"+count+"'>&nbsp;</td></tr></table>"); isClicked[level]="yes"; $.each(resultObj, function(index, value){ $(".preHolder").filter("#"+id).append(resultObj.value); }); } });

    Read the article

  • CryptGenRandom to generate asp.net session id

    - by DoDo
    Hi! does anyone have working example of CryptGenrRandom class to generate session id (need to use in my iis module). HCRYPTPROV hCryptProv; BYTE pbData[16]; if(CryptAcquireContext( &hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { if(CryptGenRandom(hCryptProv, 8, pbData)) { std::string s(( const char *) pbData); printf(s.c_str()); } else { MyHandleError("Error during CryptGenRandom."); } } else { MyHandleError("Error during CryptAcquireContext!\n"); } i tried this code but, its not working quite well (i get it from msdn) and this example don't work for me ( http://www.codeproject.com/KB/security/plaintextsessionkey.aspx ) so if anyone know how to generate sessionid using this class plz let me know tnx anyway!

    Read the article

  • Wrong SQLServer syntax: need help!

    - by user512602
    Hi, this is what I want to achieve: 4 tables are involved: Players with PlayerID as PK, Competitions with CompetID as PK Results with ResultID as PK and CompetID as FK And the 4th table: PlayerResultts with ResultID + PlayerID as PK and CompetID as new column I created. Competitions, results and PlayerResults are already populated and quite large (300000 PlayerResults so far). In order to populate the PlayerResults.CompetID column, I try a Update ... (Select....) request but I'm not aware of the right syntax and it fails. Here is my feeble attempt: update PlayerResults set competid = (select distinct(r.competid) from results r, playerresults p where r.resultID = p.resultid) Error is (of course): "Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , , = or when the subquery is used as an expression." Can someone put me in the right direction? TIA

    Read the article

  • iPhone - making the crash information more specific

    - by Digital Robot
    I have an app that is crashing at some point. Even with NSZombieEnabled turned on, the only thing I see is this message on the console: : * -[CFRunLoopTimer release]: message sent to deallocated instance 0x4cb34e0 but as the app is crashed, there's no way to know what object is this and the thread overview is not helping that much. #0 0x34a80466 in objc_msgSend #1 0x357e53c8 in CFRelease #2 0x357f3976 in __CFTypeCollectionRelease #3 0x3580c0b6 in __CFSetReleaseValue #4 0x357e6a5c in __CFBasicHashDrain #5 0x357e6900 in __CFSetDeallocate #6 0x357e54b6 in _CFRelease #7 0x357e53dc in CFRelease #8 0x3580c098 in -[__NSCFSet release] #9 0x3570f3be in -[_NSFaultingMutableSet dealloc] #10 0x3570f260 in -[_NSFaultingMutableSet release] #11 0x35702480 in -[NSManagedObject(_NSInternalMethods) _clearRawPropertiesWithHint:] #12 0x357022a8 in -[NSFaultHandler turnObject:intoFaultWithContext:] #13 0x35703dc0 in -[NSManagedObject dealloc] #14 0x356eab34 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:] #15 0x357127d6 in _performRunLoopAction #16 0x3580ac58 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ #17 0x3580aacc in __CFRunLoopDoObservers #18 0x358020ca in __CFRunLoopRun #19 0x35801c86 in CFRunLoopRunSpecific #20 0x35801b8e in CFRunLoopRunInMode #21 0x320c84aa in GSEventRunModal #22 0x320c8556 in GSEventRun #23 0x341dc328 in -[UIApplication _run] #24 0x341d9e92 in UIApplicationMain #25 0x00002e02 in main at main.m:14 it appears to be something related to core data, but knowing that doesn't help that much, because the app is all core data based and it crashes when I am not doing anything related to core data. is there a way to make the debugger more specific? thanks

    Read the article

  • X11 and ARGB visuals: does DefaultDepth() never return 32?

    - by Andy
    Hi, I'm establishing a connection to the X server like this: display = XOpenDisplay(NULL); screen = DefaultScreen(display); depth = DefaultDepth(display, screen); I'm wondering now why "depth" is always set to 24. I would expect that it is only 24 when compositing is turned off, but in fact, it is still 24 even when I turn on compositing. So in order to get a 32-bit ARGB visual I need to call XGetVisualInfo() first with depth set explicitly to 32. Now to my question: Will DefaultDepth() generally never return more than 24 or is it just on my system? (my graphics board is somewhat dated...). I know that it could return 15, 16 or even 8 for a CLUT display but can it return 32? Or do I always have to use XGetVisualInfo() first to get a ARGB 32-bit visual? Thanks, Andy

    Read the article

  • data is not getting ordered by date

    - by raging_boner
    Can't get list sorted by date. How to show data ordered by date? XDocument doc = XDocument.Load(Server.MapPath("file.xml")); IEnumerable<XElement> items = from item in doc.Descendants("item") orderby Convert.ToDateTime(item.Attribute("lastChanges").Value) descending where item.Attribute("x").Value == 1 select item; Repeater1.DataSource = items; Repeater1.DataBind(); Xml file looks like this: <root> <items> <item id="1" lastChanges="15-05-2010" x="0" /> <item id="2" lastChanges="16-05-2010" x="1" /> <item id="3" lastChanges="17-05-2010" x="1" /> </items> </root>

    Read the article

  • Why does right shift in PHP return a negative number?

    - by Legend
    I am trying to query a bittorrent tracker and am using unpack to get the list of IPs from the response. So, something like this: $ip = unpack("N", $peers); $ip_add = ($ip[1]>>24) . "." . (($ip[1]&0x00FF0000)>>16) . "." . (($ip[1]&0x0000FF00)>>8) . "." . ($ip[1]&0x000000FF); But, for some reason, I am getting the following IP addresses when I print $ip_add: 117.254.136.66 121.219.20.250 -43.7.52.163 Does anyone know what could be going wrong?

    Read the article

  • drupal: so many js and css files ?

    - by Patrick
    hi, I've realized I'm loading a lot of resources (24 css and 17 js files) using Drupal. I've several modules installed and they all come with a css and js file. For my website I'm only using 1 additional js plugin (all the other 16 come with Drupal modules). I've not installed useless modules. They are all necessary, and they require js such as swfobject, ajax_views, jquery.media, spamspan, lightbox (modal, video and default js files), etc Same thing with css files: ckeditor, filefield, lightbox, tagadelic, uploadfield, fieldgroup, vews, taxonomy_super_select, html-element, tabs, messages... etc For my website, I only use my theme css zen.css of course. So.. is this normal ? Or I should remove all this stuff? Are drupal websites normally heavy ? thanks

    Read the article

  • LINQ count query returns a 1 instead of a 0

    - by user335810
    I have the following view:- CREATE VIEW tbl_adjudicator_result_view AS SELECT a.adjudicator_id, sar.section_adjudicator_role_id, s.section_id, sdr.section_dance_role_id, d.dance_id, c.contact_id, ro.round_id, r.result_id, c.title, c.first_name, c.last_name, d.name, r.value, ro.type FROM tbl_adjudicator a INNER JOIN tbl_section_adjudicator_role sar on sar.section_adjudicator_role2adjudicator = a.adjudicator_id INNER JOIN tbl_section s on sar.section_adjudicator_role2section = s.section_id INNER JOIN tbl_section_dance_role sdr on sdr.section_dance_role2section = s.section_id INNER JOIN tbl_dance d on sdr.section_dance_role2dance = d.dance_id INNER JOIN tbl_contact c on a.adjudicator2contact = c.contact_id INNER JOIN tbl_round ro on ro.round2section = s.section_id LEFT OUTER JOIN tbl_result r on r.result2adjudicator = a.adjudicator_id AND r.result2dance = d.dance_id When I run the following query directly against the db I get 0 in the count column where there is no result select adjudicator_id, first_name, COUNT(result_id) from tbl_adjudicator_result_view arv where arv.round_id = 16 group by adjudicator_id, first_name However when I use LINQ query I always get 1 in the Count Column var query = from arv in db.AdjudicatorResultViews where arv.round_id == id group arv by new { arv.adjudicator_id, arv.first_name} into grp select new AdjudicatorResultViewGroupedByDance { AdjudicatorId = grp.Key.adjudicator_id, FirstName = grp.Key.first_name, Count = grp.Select(p => p.result_id).Distinct().Count() }; What do I need to change in the View / Linq query.

    Read the article

  • C++ : size of int, long, etc...

    - by Jérôme
    I'm looking for detailed informations regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler. But are there any standards ? I'm using Visual Studio 2008 on a 32 bit achitecture. Here is what I get : char : 1 byte short : 2 bytes int : 4 bytes long : 4 bytes float : 4 bytes double : 8 bytes I tried to find, without much success, reliable informations telling the sizes of char, short, int , long, double, float (and other types I don't think of) under different architecture and compiler.

    Read the article

  • retrive file line one by one using C#?

    - by riad
    Dear all, I have a file name abc.txt.On that file have some lines like this: jani 50,south carolina,USA karim 16,roam,Italy fara 52,sydny,Australia first line is name and second line is address.Now i need the info name on a string let say nameString and address is let say addressString.How can i do it using C#? I write a code in PHP its working smoothly.I need the same thing in C#.For yours clarification here is the php code: $file=file_get_contents('abc.txt'); $arr=explode("\n",$file); for ($i=0;$i<count($arr);$i=$i+2) { $name=$arr[$i]; $address=$arr[$i+1]; echo $name ."<br/>"; echo $address. "<br/>"; } How can i do the same thing in C#???? Another question: IS their any function in C# as like as explode in php? thanks in advance riad

    Read the article

  • Java days of week calculation

    - by Shahid
    I have an Enum for Days of week (with Everyday, weekend and weekdays) as follows where each entry has an int value. public enum DaysOfWeek { Everyday(127), Weekend(65), Weekdays(62), Monday(2), Tuesday(4), Wednesday(8), Thursday(16), Friday(32), Saturday(64), Sunday(1); private int bitValue; private DaysOfWeek(int n){ this.bitValue = n; } public int getBitValue(){ return this.bitValue; } } Given a TOTAL of any combination of the entries, what would be the simplest way to calculate all individual values and make an arraylist from it. For example given the number 56 (i.e. Wed+Thur+Fri), how to calculate the list of individual values.

    Read the article

  • Can't change Emacs's default indentation between HTML tags

    - by janoChen
    I'm confused about the Emacs indentation paradigm. I have this in my .emacs file: (setq-default tab-width 4) If I press TAB in the following situation <ul> (caret) </ul> it end up like this <ul> (caret) </ul> (with 2 spaces indentation between the HTML tags.) It should end up like this: <ul> (caret) </ul> I tried everything: (setq-default tab-width 4) (setq-default indent-tabs-mode t) (setq tab-stop-list '(4 8 12 16)) I've set every possible Emacs setting about indentation to 4 but that 2 space indentation is still there. Any suggestions?

    Read the article

  • va_list has not been declared

    - by David Doria
    When compiling some working code on Fedora 11, I am getting this error: /usr/include/c++/4.4.1/cstdarg:56: error: ‘::va_list’ has not been declared I am using: [doriad@davedesktop VTK]$ g++ --version g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2) Does anyone know what the problem could be? Thanks, Dave

    Read the article

  • Why is my implementation of strcmp not returning the proper value?

    - by Avanish Giri
    Why is this printing out 0 back in main but 6 when it is inside of the strcmp function? 7 int main() 8 { 9 char* str = "test string"; 10 char* str2 = "test strong"; 11 //printf("string length = %d\n",strlen(str)); 12 13 int num = strcmp(str,str2); 14 15 printf("num = %d\n",num); 16 } 29 int strcmp(char* str, char* str2) 30 { 31 if(*str == '\0' && *str2 == '\0') 32 return 0; 33 if(*str2 - *str == 0) 34 { 35 strcmp(str+1,str2+1); 36 } 37 else 38 { 39 int num = *str2 - *str; 40 cout << "num = " <<num<<endl; 41 return num; 42 } 43 } The output is: num = 6 num = 0 Why is it printing 0 when obviously the value that it should be returning is 6?

    Read the article

  • socket.error: [Errno 10054]

    - by C0d3r
    import socket, sys if len(sys.argv) !=3 : print "Usage: ./supabot.py <host> <port>" sys.exit(1) irc = sys.argv[1] port = int(sys.argv[2]) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.connect((irc, port)) sck.send('NICK supaBOT\r\n') sck.send('USER supaBOT supaBOT supaBOT :supaBOT Script\r\n') sck.send('JOIN #darkunderground' + '\r\n') data = '' while True: data = sck.recv(1024) if data.find('PING') != -1: sck.send('PONG ' + data.split() [1] + '\r\n') print data elif data.find('!info') != -1: sck.send('PRIVMSG #darkunderground supaBOT v1.0 by sourD' + '\r\n') print sck.recv(1024) when I run this code I get this error.. socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host it says that the error is in line 16, in data = sck.recv(1024)

    Read the article

  • SELECT with a Replace()

    - by andyjohnson
    I have a table of names and addresses, which includes a postcode column. I want to strip the spaces from the postcodes and select any that match a particular pattern. I'm trying this (simplified a bit) in T-SQL on SQL Server 2005: SELECT Replace(Postcode, ' ', '') AS P FROM Contacts WHERE P LIKE 'NW101%' But I get the following error; Msg 207, Level 16, State 1, Line 3 Invalid column name 'P'. If I remove the WHERE clause I get a list of postcodes without spaces, which is what I want to search. How should I approach this? What am I doing wrong?

    Read the article

  • What platforms have something other than 8-bit char?

    - by Craig McQueen
    Every now and then, someone on SO points out that char (aka 'byte') isn't necessarily 8 bits. It seems that 8-bit char is almost universal. I would have thought that for mainstream platforms, it is necessary to have an 8-bit char to ensure its viability in the marketplace. Both now and historically, what platforms use a char that is not 8 bits, and why would they differ from the "normal" 8 bits? When writing code, and thinking about cross-platform support (e.g. for general-use libraries), what sort of consideration is it worth giving to platforms with non-8-bit char? In the past I've come across some Analog Devices DSPs for which char is 16 bits. DSPs are a bit of a niche architecture I suppose. (Then again, at the time hand-coded assembler easily beat what the available C compilers could do, so I didn't really get much experience with C on that platform.)

    Read the article

  • for loop will not loop

    - by Bjørn Jostein Aurheim
    I have a for loop that I will use to compute time intervals to add to an ArrayList. The problem is that I can not prove that the for loop is being executed. Nothing is printed when using the system.out.println() statement, and nothing is added to the array from inside the loop ... any sugestions? // lager tidspunkter og legger disse inn i en Array kalt tider tid.setTimer(16); tid.setMinutter(0); tid.setSekunder(0); tider.add(tid.asString());// String "16:00" is added as it should System.out.println("tiden er: "+tid.asString());// gives 16:00 printed for(int i=0;i>12;i++){ System.out.println("er i løkken");// gives nothing printed tid.increaseMinutter(30); System.out.println(tid.asString());// gives nothing printed tider.add(tid.asString()); }

    Read the article

  • PHP/MySQL: Storing and retrieving UUIDS

    - by Greg
    I'm trying to add UUIDs to a couple of tables, but I'm not sure what the best way to store/retrieve these would be. I understand it's far more efficient to use BINARY(16) instead of VARCHAR(36). After doing a bit of research, I also found that you can convert a UUID string to binary with: UNHEX(REPLACE(UUID(),'-','')) Pardon my ignorance, but is there an easy way to this with PHP and then turn it back to a string, when needed, for readability? Also, would it make much difference if I used this as a primary key instead of auto_increment? EDIT: Found part of the answer: $bin = pack("h*", str_replace('-', '', $guid)); How would you unpack it?

    Read the article

< Previous Page | 193 194 195 196 197 198 199 200 201 202 203 204  | Next Page >