Daily Archives

Articles indexed Saturday May 15 2010

Page 19/78 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • how to extract rar format file on Mac?

    - by George2
    I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows. I am wondering how to extract rar compressed format file on Mac? Better free or open source software. Thanks in advance.

    Read the article

  • Entity Framework 4 - Delay Loading Expensive Fields

    - by JohnnyO
    I know this same question was asked for Entity Framework 1, but now that Entity Framework 4 has come out, and Microsoft claims that it provides all of the features of Linq to Sql + more, does Entity Framework now support lazy loading expensive properties? In Linq to Sql, this is extremely easy. There's a Delay Loaded option on any property (accessible through the Designer) that can simply be toggled on or off. Is there something similar in Entity Framework? Thanks

    Read the article

  • why my C++ output executable is so big?

    - by Vincenzo
    I have a rather simple C++ project, which uses boost::regex library. The output I'm getting is 3.5Mb in size. As I understand I'm statically linking all boost .CPP files, including all functions/methods. Maybe it's possible somehow to instruct my linker to use only necessary elements from boost, not all of them? Thanks.

    Read the article

  • whats wrong in this LINQ synatx?

    - by Saurabh Kumar
    Hi, I am trying to convert a SQL query to LINQ. Somehow my count(distinct(x)) logic does not seem to be working correctly. The original SQL is quite efficient(or so i think), but the generated SQL is not even returning the correct result. I am trying to fix this LINQ to do what the original SQL is doing, AND in an efficient way as the original query is doing. Help here would be really apreciated as I am stuck here :( SQL which is working and I need to make a comparable LINQ of: SELECT [t1].[PersonID] AS [personid] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneCode] = [t0].[Code] INNER JOIN [dbo].[person] ON [t1].[PersonID]= [dbo].[Person].PersonID WHERE ([t0].[codetype] = 'phone') AND ( ([t0].[CodeDescription] = 'Home') AND ([t1].[PhoneNum] = '111') OR ([t0].[CodeDescription] = 'Work') AND ([t1].[PhoneNum] = '222') ) GROUP BY [t1].[PersonID] HAVING COUNT(DISTINCT([t1].[PhoneNum]))=2 The LINQ which I made is approximately as below: var ids = context.Code.Where(predicate); var rs = from r in ids group r by new { r.phonenumbers.person.PersonID} into g let matchcount=g.Select(p => p.phonenumbers.PhoneNum).Distinct().Count() where matchcount ==2 select new { personid = g.Key }; Unfortunately, the above LINQ is NOT generating the correct result, and is actually internally getting generated to the SQL shown below. By the way, this generated query is also reading ALL the rows(about 19592040) around 2 times due to the COUNTS :( Wich is a big performance issue too. Please help/point me to the right direction. Declare @p0 VarChar(10)='phone' Declare @p1 VarChar(10)='Home' Declare @p2 VarChar(10)='111' Declare @p3 VarChar(10)='Work' Declare @p4 VarChar(10)='222' Declare @p5 VarChar(10)='2' SELECT [t9].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t13].[PhoneNum] FROM [dbo].[Code] AS [t10] INNER JOIN [dbo].[phonenumbers] AS [t11] ON [t11].[PhoneType] = [t10].[Code] INNER JOIN [dbo].[Person] AS [t12] ON [t12].[PersonID] = [t11].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t13] ON [t13].[PhoneType] = [t10].[Code] WHERE ([t9].[PersonID] = [t12].[PersonID]) AND ([t10].[codetype] = @p0) AND ((([t10].[codetype] = @p1) AND ([t11].[PhoneNum] = @p2)) OR (([t10].[codetype] = @p3) AND ([t11].[PhoneNum] = @p4))) ) AS [t14] ) AS [cnt] FROM ( SELECT [t3].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t7].[PhoneNum] FROM [dbo].[Code] AS [t4] INNER JOIN [dbo].[phonenumbers] AS [t5] ON [t5].[PhoneType] = [t4].[Code] INNER JOIN [dbo].[Person] AS [t6] ON [t6].[PersonID] = [t5].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t7] ON [t7].[PhoneType] = [t4].[Code] WHERE ([t3].[PersonID] = [t6].[PersonID]) AND ([t4].[codetype] = @p0) AND ((([t4].[codetype] = @p1) AND ([t5].[PhoneNum] = @p2)) OR (([t4].[codetype] = @p3) AND ([t5].[PhoneNum] = @p4))) ) AS [t8] ) AS [value] FROM ( SELECT [t2].[PersonID] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneType] = [t0].[Code] INNER JOIN [dbo].[Person] AS [t2] ON [t2].[PersonID] = [t1].[PersonID] WHERE ([t0].[codetype] = @p0) AND ((([t0].[codetype] = @p1) AND ([t1].[PhoneNum] = @p2)) OR (([t0].[codetype] = @p3) AND ([t1].[PhoneNum] = @p4))) GROUP BY [t2].[PersonID] ) AS [t3] ) AS [t9] WHERE [t9].[value] = @p5 Thanks!

    Read the article

  • CSS with PHP Extension ????

    - by raj
    hi everyone,,,plz helpl me out .. i want my css to recognise as mystyle.php but inside code would be of css , and i want to access it in my index.php page with header method ,i dont want to use Link method.

    Read the article

  • MySQL: Ignore the timestamp attribute

    - by Nique
    I have a timestamp column in my database, and i use it for almost every field, but now, i just want to update the hit counter.. and i do not want to update the timestamp column with it. I use the timestamp field to see the last 'content' update. Not for every hit. Is it possible to let mysql stop updating the timestamp column for just one query?

    Read the article

  • Returning JsonResult From ASP.NET MVC 2.0 Controller and Unit Testing

    This post will show how to return a simple Json result from an ASP.NET MVC 2.0 web project.  It will show how to test that result inside a unit test and essentially pick apart the Json, just... This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performance programming...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

  • Using Visual Studio 2010s Debugger PIN Feature

    One of the very cool new features in Visual Studio 2010 is the ability to Pin a variable you are watching, right in the place you want to see it.  Its always been a hassle to have to add a... This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performance programming...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

  • Tor provider point

    - by user41998
    Hello, I have a tor runned on my computer. In Vidalia (gui-frontend) there is a button: 'Use a new identity'. This will change last point of connecting in Tor-network. Are there any commands which I can send to the 9051 port (configure-port) to use randomly any another server?

    Read the article

  • Share Internet via Ethernet from Mac OSX to Ubuntu (10.04)?

    - by user
    Anyone know how to share an Internet connection over Ethernet, from Mac OSX to Ubuntu (Lucid Lynx 10.04)? EDIT Mac receives Internet access via Airport (Wireless). I don't need any Mac-Ubuntu file sharing, just need to access the Internet through the Mac. (The reason for this is that the Ubuntu box's wireless adapter isn't supported by the default 10.04 install, so I need to connect Ubuntu to the net with a wired connection to update certain packages.)

    Read the article

  • LinkSys router suddenly cannot get an IP address

    - by user43208
    I have a linksys router WRT54G2 connected to a cable broadband. Just last week, everything was working perfectly - I would be able to connect my laptop to the internet using WiFi. However, starting last week, I suddenly lost my internet connection. At first I thought something was wrong with my ISP. However, when I tried connecting the cable directly to my laptop, I found out that there was no problem with the internet connection after all. It appears that it is only my router that cannot get IP address. I have already tried cloning my MAC address and reconfiguring my router using the setup CD, but nothing worked. What could be the problem here? Thank you. Regards, Erwin

    Read the article

  • what is called KEY

    - by Bharanikumar
    CREATE TABLE `ost_staff` ( `staff_id` int(11) unsigned NOT NULL auto_increment, `group_id` int(10) unsigned NOT NULL default '0', `dept_id` int(10) unsigned NOT NULL default '0', `username` varchar(32) collate latin1_german2_ci NOT NULL default '', `firstname` varchar(32) collate latin1_german2_ci default NULL, `lastname` varchar(32) collate latin1_german2_ci default NULL, `passwd` varchar(128) collate latin1_german2_ci default NULL, `email` varchar(128) collate latin1_german2_ci default NULL, `phone` varchar(24) collate latin1_german2_ci NOT NULL default '', `phone_ext` varchar(6) collate latin1_german2_ci default NULL, `mobile` varchar(24) collate latin1_german2_ci NOT NULL default '', `signature` varchar(255) collate latin1_german2_ci NOT NULL default '', `isactive` tinyint(1) NOT NULL default '1', `isadmin` tinyint(1) NOT NULL default '0', `isvisible` tinyint(1) unsigned NOT NULL default '1', `onvacation` tinyint(1) unsigned NOT NULL default '0', `daylight_saving` tinyint(1) unsigned NOT NULL default '0', `append_signature` tinyint(1) unsigned NOT NULL default '0', `change_passwd` tinyint(1) unsigned NOT NULL default '0', `timezone_offset` float(3,1) NOT NULL default '0.0', `max_page_size` int(11) NOT NULL default '0', `created` datetime NOT NULL default '0000-00-00 00:00:00', `lastlogin` datetime default NULL, `updated` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`staff_id`), UNIQUE KEY `username` (`username`), KEY `dept_id` (`dept_id`), **KEY `issuperuser` (`isadmin`),** **KEY `group_id` (`group_id`,`staff_id`)** ) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci; Hi the above query is the osticket open source one, i know primary key , foreign key , unique but AM NOT SURE WHAT IS THIS KEY group_id (group_id,staff_id) Please tell me, this constraints name....

    Read the article

  • Need help regarding internationalization of iPhone application

    - by Taufeeq Ahmed
    I have provided support for two languages, English and Chinese, in my iPhone application. I use string files for the languages using "key"-"value" pairs and my application displays the appropriate language using NSLocalizedString(@"Fund red not red?", @""). I get only Chinese text when I run the app in XCode. How can I switch to different languages in XCode (iPhone simulator)?

    Read the article

  • Complicated jQuery .hover Work

    - by Paul Herz
    The following code is giving me a lot of trouble. To note, .hover changes the background image. Firstly, how can I combine the two with .hover rather than a separate mouseenter and mouseleave? Second, How can I make it so that while the div is shifting upwards, the background image is simultaneously fading? $('div.designbox.orangehello').mouseenter(function() { $('div.designbox.orangehello').animate({ top: '-=10', }, 55, function() { $(this).addClass('hover'); }); }); $('div.designbox.orangehello').mouseleave(function() { $('div.designbox.orangehello').animate({ top: '+=10', }, 55, function() { $(this).removeClass('hover'); }); });

    Read the article

  • How dynamic can I make my LINQ To SQL Statements?

    - by mcass20
    I have the need to construct a LINQ To SQL statement at runtime based on input from a user and I can't seem to figure out how to dynamically build the WHERE clause. I have no problem with the following: string Filters = "<value>FOO</value>"; Where("FormattedMessage.Contains(@0)",Filters) But what I really need is to make the entire WHERE clause dynamic. This way I can add multiple conditions at runtime like this (rough idea): foreach (Filter filter in filterlist) { whereclause = whereclause + "&& formattedmessage.contains(filter)"; }

    Read the article

  • send Image from J2ME to SERVLET

    - by Akash
    Hi, I want to send Image from J2ME to SERVLET. I am able to convert image into Byte Array, and send by Http POST. I have coded as : - From Mobile : conn = (HttpConnection)Connector.open(url,Connector.READ_WRITE,true); conn.setRequestMethod(HttpConnection.POST); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); os.write(bytes, 0, bytes.length);//bytes = byte array of image At servlet : String line; BufferedReader r1 = new BufferedReader(new InputStreamReader(in)); while ((line = r1.readLine()) != null) { System.out.println("line=" + line); buf.append(line); } String s = buf.toString(); byte[] img_byte = s.getBytes(); Now d problem I found is, when I send Bytes from Mob App, some bytes are LOST , whose value is 0A and 0D-Hex ... Exactly, Cr- Carriage Return & Lf- Line Feed... It means, POST method OR readLine() not able to accept 0A & 0D value... And so I come to know that, LOST bytes are 0A and 0D occurrence in image's byte array.... Any one have any idea, how to do this, or how to use any another method..... Thanks -Akash

    Read the article

  • Php - Looping For Different CSS

    - by bob
    MySQL $selectSize = "SELECT * FROM products"; $querySize = $db->select($selectSize); while ($product = $db->fetcharray($querySize)) { HTML <ul> <li>Product A</li> <li>Product B</li> <li class='right'>Product C</li> <li>Product D</li> <li>Product E</li> <li class='right'>Product F</li> </ul> Question While getting the product, I want the Product C and Product F or any product after 3 loops will have class='right' to the list style. Let me know Thanks

    Read the article

  • Generated LinqtoSql Sql 5x slower than SAME EXACT hand-written sql

    - by JasonM
    I have a sql statement which is hardcoded in an existing VB6 app. I'm upgrading a new version in C# and using Linq To Sql. I was able to get LinqToSql to generate the same sql (before I start refactoring), but for some reason the Sql generated by LinqToSql is 5x slower than the original sql. This is running the generated Sql Directly in LinqPad. The only real difference my meager sql eyes can spot is the WITH (NOLOCK), which if I add into the LinqToSql generated sql, makes no difference. Can someone point out what I'm doing wrong here? Thanks! Existing Hard Coded Sql (5.0 Seconds) SELECT DISTINCT CH.ClaimNum, CH.AcnProvID, CH.AcnPatID, CH.TinNum, CH.Diag1, CH.GroupNum, CH.AllowedTotal FROM Claims.dbo.T_ClaimsHeader AS CH WITH (NOLOCK) WHERE CH.ContractID IN ('123A','123B','123C','123D','123E','123F','123G','123H') AND ( ( (CH.Transmited Is Null or CH.Transmited = '') AND CH.DateTransmit Is Null AND CH.EobDate Is Null AND CH.ProcessFlag IN ('Y','E') AND CH.DataSource NOT IN ('A','EC','EU') AND CH.AllowedTotal > 0 ) ) ORDER BY CH.AcnPatID, CH.ClaimNum Generated Sql from LinqToSql (27.6 Seconds) -- Region Parameters DECLARE @p0 NVarChar(4) SET @p0 = '123A' DECLARE @p1 NVarChar(4) SET @p1 = '123B' DECLARE @p2 NVarChar(4) SET @p2 = '123C' DECLARE @p3 NVarChar(4) SET @p3 = '123D' DECLARE @p4 NVarChar(4) SET @p4 = '123E' DECLARE @p5 NVarChar(4) SET @p5 = '123F' DECLARE @p6 NVarChar(4) SET @p6 = '123G' DECLARE @p7 NVarChar(4) SET @p7 = '123H' DECLARE @p8 VarChar(1) SET @p8 = '' DECLARE @p9 NVarChar(1) SET @p9 = 'Y' DECLARE @p10 NVarChar(1) SET @p10 = 'E' DECLARE @p11 NVarChar(1) SET @p11 = 'A' DECLARE @p12 NVarChar(2) SET @p12 = 'EC' DECLARE @p13 NVarChar(2) SET @p13 = 'EU' DECLARE @p14 Decimal(5,4) SET @p14 = 0 -- EndRegion SELECT DISTINCT [t0].[ClaimNum], [t0].[acnprovid] AS [AcnProvID], [t0].[acnpatid] AS [AcnPatID], [t0].[tinnum] AS [TinNum], [t0].[diag1] AS [Diag1], [t0].[GroupNum], [t0].[allowedtotal] AS [AllowedTotal] FROM [Claims].[dbo].[T_ClaimsHeader] AS [t0] WHERE ([t0].[contractid] IN (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7)) AND (([t0].[Transmited] IS NULL) OR ([t0].[Transmited] = @p8)) AND ([t0].[DATETRANSMIT] IS NULL) AND ([t0].[EOBDATE] IS NULL) AND ([t0].[PROCESSFLAG] IN (@p9, @p10)) AND (NOT ([t0].[DataSource] IN (@p11, @p12, @p13))) AND ([t0].[allowedtotal] > @p14) ORDER BY [t0].[acnpatid], [t0].[ClaimNum] New LinqToSql Code (30+ seconds... Times out ) var contractIds = T_ContractDatas.Where(x => x.EdiSubmissionGroupID == "123-01").Select(x => x.CONTRACTID).ToList(); var processFlags = new List<string> {"Y","E"}; var dataSource = new List<string> {"A","EC","EU"}; var results = (from claims in T_ClaimsHeaders where contractIds.Contains(claims.contractid) && (claims.Transmited == null || claims.Transmited == string.Empty ) && claims.DATETRANSMIT == null && claims.EOBDATE == null && processFlags.Contains(claims.PROCESSFLAG) && !dataSource.Contains(claims.DataSource) && claims.allowedtotal > 0 select new { ClaimNum = claims.ClaimNum, AcnProvID = claims.acnprovid, AcnPatID = claims.acnpatid, TinNum = claims.tinnum, Diag1 = claims.diag1, GroupNum = claims.GroupNum, AllowedTotal = claims.allowedtotal }).OrderBy(x => x.ClaimNum).OrderBy(x => x.AcnPatID).Distinct(); I'm using the list of constants above to make LinqToSql Generate IN ('xxx','xxx',etc) Otherwise it uses subqueries which are just as slow...

    Read the article

  • javascript window.open lost session on closing popup window

    - by user341799
    Hi I'm using window.open function to popup the window as I close it, the link in parent window are not working here is my code `var rcount =0; var radio_val = document.form1.ac_voucher_type_id.length; for (counter = 0; counter < radio_val; counter++){ if (document.form1.ac_voucher_type_id[counter].checked){ radio_choice = document.form1.ac_voucher_type_id[counter].value; //alert(document.form1.ac_voucher_type_id[counter].value); url1 = '?compid=&date='+document.getElementById('datepicker2').value+'&vouchertype='+radio_choice+'&voucherid='; url= typ+"entry.php"+url1; window.open(url,'',"width=500,height=500,scrollbars=yes"); }else{ rcount++; } } // alert(rcount); if(rcount==radio_val){ alert("Please select voucher type"); }` Please suggest the solution for this

    Read the article

  • Hiding Table Rows

    - by David Stein
    I have a table that I'm using to show details from the line items of a quote. I want to hide a particular row depending on the value of the field in it. The expression I've tried is to set the row visibility to: =IIF(isnothing(First(Fields!NEW_PRICEBREAKS.Value, "QuoteDetail")),true,false) When I run the query from the dataset "Null" returns for NEW_PRICEBREAKS for most of the records. Also, when I expanded the row with another column with this expression: =IIF(isnothing(First(Fields!NEW_PRICEBREAKS.Value, "QuoteDetail")),"is nothing","not nothing") I see "not nothing" repeated over and over again. I've attempted to use TRIM inside of the isnothing to remove spaces and it still doesn't work. Also, the sql data type for NEW_PRICEBREAKS is nvarchar(MAX). Any ideas how I can suppress this row correctly?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >