Search Results

Search found 122 results on 5 pages for 'mihai damian'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • GTA 4 crashes while trying to run it

    - by Damian
    Hi! I got those two errors when I'm trying to run GTA4: Description: Critical runtime problem Problem signature: Event Name Problem: APPLICATION CRASH System RAM: -1 Available RAM: -532590592 Number of CPUs: 4 Video Card Manufacturer: NVIDIA Video Card Description: NVIDIA GeForce 9800 GT Video Card Driver Version: 8.17.0012.5919 Version system OS: 6.1.7600.2.0.0.256.1 ID settings Regional: 1045 And the second error: Problem signature: Event Name Problem: BEX Name Application: GTAIV.exe Version Application: 1.0.7.0 Timestamp Application: 4bd9efbe Module Name error: StackHash_fea7 Module Version with the error: 0.0.0.0 Timestamp module with error: 00000000 Exception Offset: 0000b513 Code exception: c0000005 Data exception: 00000008 System Version OS: 6.1.7600.2.0.0.256.1 ID settings Regional: 1045 Additional Information 1: fea7 Additional information 2: fea78afc140967119290cc27385e0510 Additional Information 3: 20ce Additional Information 4: 20ce3e492a2aa7e5b8cfe9b7b1f05b42 My PC spec: Proc: Intel i5 (4x2,66ghz) RAM: 8GB DDR3 1066mhz Graphics: ASUS EN9800GT/DI/1GD3 OS: WINDOWS 7 64-bit I think it should work well on my PC, I couldn't find the solution to get it working so I hope You can help me. P.S. Sorry for my English - I'm from Poland.

    Read the article

  • Orphaned SQL Recordsets/Connections with IIS

    - by Damian
    I have an IIS 6 site running on Windows 2003 Server x86 with MS SQL2005 Enterprise edition running ASP Classic (no choice). The site runs very fast with about 8000 page views per hour. All of my SQL tables are indexed and I have used the profiler to check my queries, the slowest of which is only about 10-15ms. I have autoshrink disabled, autogrow is set to 250mb, database is 2gb with 800mb of free space. My problem is that every now and then the site will slow to a crawl for no reason. Pages that just have a simple 'connect to databse and increment a hit counter' work ok, but more SQL intensive pages that normally execute in about 60ms take 25,000ms to run. This happens for about 30 seconds and then goes away. I was having an issue with orphan recordsets and connections due to the way I was releasing them. I have fixed this up and the issue is much better, but I am still getting them. Is there a way with permon, etc. to track when SQL Server or Windows closes these Orphan connections? At least if I can monitor the issue I will know if I am making progress or if I am even looking at the right things. Is there anything else I might be missing? Thank you!

    Read the article

  • Silverlight Cream for March 20, 2010 -- #815

    - by Dave Campbell
    In this Issue: Andy Beaulieu(-2-, -3-), Alex Golesh, Damian Schenkelman, Adam Kinney(-2-), Jeremy Likness, Laurent Bugnion, and John Papa. Shoutouts: Adam Kinney has a good summary up of where to go for all the tools and toys: Install checklist for Silverlight 4 RC, Blend 4 Beta and Windows Phone Developer tools from MIX10 ... tons of links Laurent Bugnion had a few announcements at MIX10: MVVM Light V3 released at #MIX10, and he followed that with What’s new in MVVM Light V3 ... now for Windows Phone! Laurent Bugnion also has announced Sample code for my #mix10 talk online From SilverlightCream.com: Physics Games in Silverlight on Windows Phone 7 Andy Beaulieu has the Physics Helper working for WP7 already... read his post, check out all the links and get going on something fun... was great seeing you at MIX, too, Andy! Silverlight 4: GPU Accelerated PlaneProjection Andy Beaulieu has a comparison up of Plane Projection with and without the new GPU acceleration... be sure to read his notes section. Silverlight 4 PathListBox for Motion Path Animation Have you heard of the PathListBox? Well, showing is better than telling, so check out Andy Beaulieu's post on it Silverlight at Windows Phone 7 Alex Golesh has a quick overview on developing a Windows Phone 7 app in Silverlight using the new toys, and executiting it in the emulator Prism v2.1: Creating a Region Adapter for the Accordion control Damian Schenkelman shows how to use the Accordian control from the toolkit as a region in a Prism app. Expression Blend 4 Beta Feature Overview available for download Adam Kinney announced the presence of an Expression Blend whitepaper as well... you should go grab that too .toolbox – Free online Silverlight and Expression Blend training Want to improve your Silverlight chops or gain some Expression Blend chops? Check out .toolbox post that Adam Kinney posted Introducing the Visual State Aggregator Jeremy Likness describes the basic panel A/panel B problem, describes ways he and other folks have flipped between them, then describes his Visual State Aggregator ... and it's downloadable for you to give it a dance! Multithreading in Windows Phone 7 emulator: A bug Laurent Bugnion found a bug wit multi-threading on the Windows Phone emulator. He confirmed this with the team, and has a workaround you'll be needing... thanks Laurent. Silverlight Overview - Technical Whitepaper John Papa has reiterated the existence of this Silverlight 4 whitepaper ... it was updated this week, and we all should be aware of it. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Advanced 2D and 3D Design Tools in ZWCAD 2010

    Last time I introduced you my initial experiences with a powerful CAD software - ZWCAD 2010 (http://www.zwcad.org/products_download_list.php?id=107). As I continued with my testing, I found more surp... [Author: Damian Chloe - Computers and Internet - March 29, 2010]

    Read the article

  • MS-DOS find command

    - by mihai
    Hi, I have the following command: find Acc*\bin\Debug\*.pdb > temp.txt Looking in temp.txt, I have: Accounting/bin/Debug/Accounting.pdb Accounting/bin/Debug/BackendProcess.pdb NOTE the forward slashes. Why does it output file names like this? And how do I get it to output backslashes, so I can use del on those files? Thanks

    Read the article

  • Asterisk in eregi

    - by Mihai
    //URL START $urlregex = "^(https?|ftp)\:\/\/"; // USER AND PASS $urlregex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$.-]+)?@)?"; // HOSTNAME OR IP $urlregex .= "[a-z0-9+\$-]+(.[a-z0-9+\$_-]+)*"; // PORT $urlregex .= "(\:[0-9]{2,5})?"; // PATH $urlregex .= "(\/([a-z0-9+\$_-].?)+)*\/?"; // GET Query $urlregex .= "(\?[a-z+&\$.-][a-z0-9;:@/&%=+\$.-]*)?"; // ANCHOR $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)?\$"; // check if (eregi($urlregex, $url)) {echo "good";} else {echo "bad";} but what if I have http://www.example.com/about-me/my-4*-hotel/ That eregi check isn't valid because of the asterisk. What should I do?

    Read the article

  • CKEditor adds html entities to inline CSS. Is the CSS still valid?

    - by Mihai Secasiu
    I have this piece of code: <table style="background-image: url(path/to_image.png)"> And when I load it in CKEditor it's transformed in: <table style="background-image: url(&quot;path/to_image.png&quot;)"> Is this still still valid CSS? Actually I'm not so interested if it's valid but if there would be any problems with any web browser or email client ( the editor is used for composing a html email ). Firefox and Thunderbird seem to be fine with it.

    Read the article

  • cURL gets Internal Server Error when posting to aspx page

    - by Mihai
    I have a big problem. I have some applications made on an unix based system, and I use PHP with cURL to post an XML question to an IIS server with asp.net. Every time I ask the server something I get error: HTTP/1.1 500 Internal Server Error Date: Tue, 04 May 2010 07:36:08 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 3032 But if I ask same question on another server, almost identically to this one (BOTH configured by me) I get results like it should and the headers: HTTP/1.1 200 OK Date: Tue, 04 May 2010 07:39:37 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 9169 I tried everything, searched hundreds of forums, but i don't find anything. In IIS logs I only get: 2010-05-04 07:36:08 W3SVC1657587027 80.xx.xx.xx POST /XML_SERV/XmlAPI.aspx - 80 - 80.xx.xx.xx Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1 500 0 0 any ideas where to look what is going on? I forgot to mention! If I use an XML request software, and ask same question, it works.

    Read the article

  • cellForRowAtIndexPath called too late

    - by Mihai Fonoage
    Hi, I am trying to re-load a table every time some data I get from the web is available. This is what I have: SearchDataViewController: - (void)parseDatatXML { parsingDelegate = [[XMLParsingDelegate alloc] init]; parsingDelegate.searchDataController = self; // CONTAINS THE TABLE THAT NEEDS RE-LOADING; ImplementedSearchViewController *searchController = [[ImplementedSearchViewController alloc] initWithNibName:@"ImplementedSearchView" bundle:nil]; ProjectAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; UINavigationController *nav = (UINavigationController *)[delegate.splitViewController.viewControllers objectAtIndex: 0]; NSArray *viewControllers = [[NSArray alloc] initWithObjects:nav, searchController, nil]; self.splitViewController.viewControllers = viewControllers; [viewControllers release]; // PASS A REFERENCE TO THE PARSING DELEGATE SO THAT IT CAN CALL reloadData on the table parsingDelegate.searchViewController = searchController; [searchController release]; // Build the url request used to fetch data ... NSURLRequest *dataURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:dataURL]]; parsingDelegate.feedConnection = [[[NSURLConnection alloc] initWithRequest:dataURLRequest delegate:parsingDelegate] autorelease]; } ImplementedSearchViewController: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSLog(@"count = %d", [keys count]); // keys IS A NSMutableArray return [self.keys count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... cell.textLabel.text = [keys objectAtIndex:row]; ... } XMLParsingDelgate: -(void) updateSearchTable:(NSArray *)array { ... [self.currentParseBatch addObject:(NSString *)[array objectAtIndex:1]]; // RELOAD TABLE [self.searchViewController.table reloadData]; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { if ([elementName isEqualToString:@"..."]) { self.currentParseBatch = [NSMutableArray array]; searchViewController.keys = self.currentParseBatch; ... } ... } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"..."]) { ... [self performSelectorOnMainThread:@selector(updateSearchTable:) withObject:array waitUntilDone:NO]; } ... } My problem is that when I debug, the calls go between reloadData and numberOfRowsInSection until the keys array is filled with the last data, time at which the cellForRowAtIndexPath gets called. I wanted the table to be updated for each element I send, one by one, instead of just in the end. Any ideas why this behavior? Thank you!

    Read the article

  • Using the mpz_powm functions from the GMP/MPIR libraries with negative exponents

    - by Mihai Todor
    Please consider the following code: mpz_t x, n, out; mpz_init_set_ui(x, 2UL); mpz_init_set_ui(n, 7UL); mpz_init(out); mpz_invert(out, x, n); gmp_printf ("%Zd\n", out);//prints 4. 2 * 4 (mod 7) = 1. OK mpz_powm_ui(out, x, -1UL, n);//prints 1. 2 * 1 (mod 7) = 2. How come? gmp_printf ("%Zd\n", out); mpz_clear(x); mpz_clear(n); mpz_clear(out); I am unable to understand how the mpz_powm functions handle negative exponents, although, according to the documentation, it is supposed to support them. I would expect that raising a number to -1 modulo n is equivalent to inverting it modulo n. What am I missing here?

    Read the article

  • Segmentation fault when using files C++

    - by Popa Mihai
    I am using ubuntu 12.04. I have been trying a few IDE's for simple C++ school projects. However, with codelite, anjuta and kdevelop I encountered a problem: when I am trying to read / write in files I get segmentation fault: core dumped. I am using a basic source: #include<stdio.h> FILE*f=fopen("test.in","r"); FILE*g=fopen("test.out","w"); int main () { int a,b; fscanf(f,"%d %d",&a,&b); fprintf(g,"%d\n",a+b); fclose(f); fclose(g); return 0; } I have to say that programs with stdin/stdout work well. Thank you,

    Read the article

  • Dismiss android preferences dialog on Keyboard ACTION_DONE press

    - by Damian
    I would like to be able to close the editpreference dialog (as shown here http://twitpic.com/18ttdp) by pressing the 'Done' button on the keyboard. Currently, pressing 'Done' just dismisses the keyboard but leaves the dialog. In other parts of my application I use code similar to the following to intercept the 'Done' key press and execute actions in my activity: text.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { //do stuff here return true; } return false; } }); However, I am unsure of how to do achieve this same effect in my preference activity or layout xml.

    Read the article

  • grails run-war connects to mysql but grails run-war doesn't

    - by damian
    Hi, I have a unexpected problem. I had create a war with grails war. Then I had deployed in Tomcat. For my surprise the crud works fine but I don't know what persistence is using. So I did this test: Compare grails prod run-app with grails prod run-war. The first works fine, and does conect with the mysql database. The other don't. This is my DataSource.groovy: dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "grails" password = "mysqlgrails" } hibernate { cache.use_second_level_cache=false cache.use_query_cache=false cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } test { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } production { dataSource { dbCreate = "update" url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } } Also I extract the war to see if I could find some data source configuration file without success. More info: Grails version: 1.2.1 JVM version: 1.6.0_17 Also I think this question it's similar, but doesn't have a awnser.

    Read the article

  • Web-design / UI advice

    - by Damian
    I'm working on a website on a Fmylife style. Now the homepage is the page showing the list of the latest posts. But I think there is a problem with that: The most "interesting" page is the one showing the top posts of the last days, but that page has very few visits compared to the main page. I suppose that's only because the main page is the "default" one. So, I've been thinking of making a home page that shows no posts (only one at the top of the page) but 4 big buttons showing the visitors what are the options to browse the content. But I'm also afraid that most users will not click any option and leave the site having seen no posts. So I don't know what to do. Obviously I have no idea of what will be good from a usability/efficiency point of view. Maybe a mix of the two options will be the best, but I don't know how to mix them. Any advice or idea will be greatly appreciated. The current home page looks like this: http://soquestion.latest.secretsapp.appspot.com/latest The new home page would look like this: http://soquestion.latest.secretsapp.appspot.com/

    Read the article

  • Webservice returns java.lang.reflect.InvocationTargetException

    - by Damian
    Hi, I am receiving the above message when making a request to a java webservice. We originally created a Java Console application and manually submitted an xml file. When running this as a Java Application the response is successfully created and displayed by using System.out.println. We are creating the web service by selecting the java file that contains the methods and choosing "create webservice" specifying the dynamic project that the webservice is to be created in and the methods to be exposed. What the application is doing is taking an xml file and unmarshalling this to an object using: public static Object unmarshalToObject(Class classToBeBound, String xmlRequest) { Object obj = new Object(); try { JAXBContext jc = JAXBContext.newInstance(classToBeBound); Unmarshaller um = jc.createUnmarshaller(); obj = um.unmarshal(new StringReader(xmlRequest)); } catch (Exception e) { e.printStackTrace() } return obj; } Some processing is carried out on the file and then an object is marshalled to xml as follows: public static String marshalToXML(Object data) { StringWriter sw = new StringWriter(); try { logger.info("Create new Marshall"); JAXBContext jc = JAXBContext.newInstance("ContextPathName"); logger.info("Marshalled to xmlObjects"); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); marshaller.marshal(data, sw); } catch (Exception e) { logException(logger, e); } return sw.toString(); } The following is the line of code that seems to be causing an issue as the logger displays the message prior to this: JAXBContext jc = JAXBContext.newInstance("ContextPathName"); The webservice never gets to the next line - the following is the body of the SOAP message: <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.reflect.InvocationTargetException</faultstring> <detail> <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">servername</ns1:hostname> </detail> </soapenv:Fault> I have added Try/Catch around this section of code even as far as looking for JAXBExceptions but this does not seem to catch anything - nor does the general exception. This issue does not occur when running the console application. The build path for this includes the following contents of sun\jwsdp-2.0\jaxb\lib: jaxb-api.jar jsr173_1.0_api.jar jaxb-impl.jar I have added these to the lib folder in the WEB-INF file of the dynamic project. I am running the webservice in JBuilder 2008 R2 and using SOAPUI to submit the request - this points to the wsdl generated when creating the webservice. If anyone has any help or ideas on how to solve this could they please reply - thanks for taking the time to read this post!

    Read the article

  • grails prod run-app connects to mysql but grails prod run-war doesn't

    - by damian
    Hi, I have a unexpected problem. I had create a war with grails war. Then I had deployed in Tomcat. For my surprise the crud works fine but I don't know what persistence is using. So I did this test: Compare grails prod run-app with grails prod run-war. The first works fine, and does conect with the mysql database. The other don't. This is my DataSource.groovy: dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "grails" password = "mysqlgrails" } hibernate { cache.use_second_level_cache=false cache.use_query_cache=false cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } test { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } production { dataSource { dbCreate = "update" url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } } Also I extract the war to see if I could find some data source configuration file without success. More info: Grails version: 1.2.1 JVM version: 1.6.0_17 Also I think this question it's similar, but doesn't have a awnser.

    Read the article

  • WiX Action Sequence

    - by Damian Vogel
    I was looking for list of actions and their sequence when running a WiX setup. Somehow the official website doesn't seem to provide any information. The basic problem is that I want to schedule my custom actions correctly. Typically I need to register a DLL with regsvr32.exe, and this can only be done once the files are copied to the harddrive. However the custom action <Custom Action="RegisterShellExt" After="InstallFiles"> failed with the error message "file not found". What I've done then is analizing the log of my MSI with WiX Edit, and I've found that the Action InstallFiles exists more than once. And effectively the files are written only the second time it appears. So I changed my custom action to the following : <Custom Action="RegisterShellExt" Before="InstallFinalize"> Here is the sequence I've extracted from the logs of my MSI: Action start 15:16:49: INSTALL. Action start 15:16:49: PrepareDlg. Action start 15:16:49: AppSearch. Action start 15:16:49: LaunchConditions. Action start 15:16:49: ValidateProductID. Action start 15:16:49: DIRCA_NEWRETARGETABLEPROPERTY1.5D429292039C46FCA3253E37B4DA262A. Action start 15:16:50: CostInitialize. Action start 15:16:50: FileCost. Action start 15:16:50: CostFinalize. Action start 15:16:50: WelcomeDlg. Action 15:16:51: LicenseAgreementDlg. Dialog created Action 15:16:53: CustomizeDlg. Dialog created Action 15:16:55: VerifyReadyDlg. Dialog created Action start 15:16:56: ProgressDlg. Action start 15:16:56: ExecuteAction. Action start 15:16:58: INSTALL. Action start 15:16:58: AppSearch. Action start 15:16:58: LaunchConditions. Action start 15:16:58: ValidateProductID. Action start 15:16:58: CostInitialize. Action start 15:16:59: FileCost. Action start 15:16:59: CostFinalize. Action start 15:16:59: InstallValidate. Action start 15:17:00: InstallInitialize. Action start 15:17:08: ProcessComponents. Action 15:17:09: GenerateScript. Generating script operations for action: Action ended 15:17:09: ProcessComponents. Return value 1. Action start 15:17:09: UnpublishFeatures. Action start 15:17:09: RemoveShortcuts. Action start 15:17:09: RemoveFiles. Action start 15:17:09: InstallFiles. Action start 15:17:10: CreateShortcuts. Action start 15:17:10: RegisterUser. Action start 15:17:10: RegisterProduct. Action start 15:17:10: PublishFeatures. Action start 15:17:10: PublishProduct. Action start 15:17:10: ConfigureInstaller. Action start 15:17:10: InstallFinalize. Action 15:17:10: ProcessComponents. Updating component registration Action 15:17:12: InstallFiles. Copying new files Action 15:17:21: CreateShortcuts. Creating shortcuts Action 15:17:21: RegisterProduct. Registering product Action 15:17:23: ConfigureInstaller. [[note: CustomAction]] Action 15:17:22: PublishFeatures. Publishing Product Features Begin CustomAction 'ConfigureInstaller' Action 15:17:28: RollbackCleanup. Removing backup files Action ended 15:17:28: InstallFinalize. Return value 1. Action start 15:17:28: RegisterShellExt. [[note: CustomAction]] Action ended 15:17:33: INSTALL. Return value 1. Action start 15:17:35: ExitDialog. Does anyone know an official listing?

    Read the article

  • Pros/Cons of document based database vs relational database

    - by damian
    I've been trying to see if I can accomplish some requirements with a document based database, in this case CouchDB. Two generic requirements: CRUD of entities with some fields which have unique index on it ecommerce web app like eBay (better description here). And I'm begining to think that a Document-based database isn't the best choice to address these requirements. Furthermore, I can´t imagine a use for a Document based database (maybe my imagination is too little). Can you explain me if I am asking pears to an elm when I try to use a Document based database for this requirements?

    Read the article

  • Is it possible to run Visual Studio Database Edition schema migrations from the command line?

    - by Damian Powell
    Visual Studio 2008 Database Edition (Data Dude) has the ability to perform schema comparisons between databases and generate a script which migrates from one database to the other. Is it possible to perform this comparison and generate the migration script from the command line? If so, what are the command line tools, and are the same tools used in equivalent versions of Visual Studio 2010?

    Read the article

  • Object database for website

    - by Damian
    I was planning to use db4o for a website. It's a microblog site with small posts and comments developed in java. The thing is I contacted db4o support asking if db4o would be suitable for a website, and they answered me that only for websites with low concurrency. That means with few requests? So, now I think db4o will not be a good choice. Do you know if there is any object database for java suitable for a website?

    Read the article

  • SHA function issues

    - by Damian James
    I have this php code from my login.php if (isset($_POST['logIn'])) { $errmsg = ""; $logname = mysqli_real_escape_string($dbc, trim($_POST['usernameIn'])); $logpassword = mysqli_real_escape_string($dbc, trim($_POST['passwordIn'])); $query = "SELECT user_id, username FROM members WHERE username = '$logname' AND password = SHA('$logpassword')"; $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { $row = mysqli_fetch_array($data); setcookie('user_id', $row['user_id'], time() + (60 * 60 * 24 * 30)); //expires after 30 days setcookie('username', $row['username'], time() + (60 * 60 * 24 * 30)); $home = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; header('Location: ' . $home); } else { $errmsg = '<p class="errormsg">Username or password is incorrect.</p>'; } } And for some reason, it always ends up setting $errmsg in the else statement. I am sure that I'm entering information (username,password) that is correct and exists in the database. I insert my values (from a signup script) using this query: $query = "INSERT INTO members (username, password, email) VALUES ('$username', SHA('$password'), '$email')"; Anyone see the problem with this script? Thanks!

    Read the article

  • Challenge: Neater way of currying or partially applying C#4's string.Join

    - by Damian Powell
    Background I recently read that .NET 4's System.String class has a new overload of the Join method. This new overload takes a separator, and an IEnumerable<T> which allows arbitrary collections to be joined into a single string without the need to convert to an intermediate string array. Cool! That means I can now do this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0); var list = string.Join(",",evenNums); ...instead of this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .Select(i => i.ToString()) .ToArray(); var list = string.Join(",", evenNums); ...thus saving on a conversion of every item to a string, and then the allocation of an array. The Problem However, being a fan of the functional style of programming in general, and method chaining in C# in particular, I would prefer to be able to write something like this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .string.Join(","); This is not legal C# though. The closest I've managed to get is this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .ApplyTo( Functional.Curry<string, IEnumerable<object>, string> (string.Join)(",") ); ...using the following extension methods: public static class Functional { public static TRslt ApplyTo<TArg, TRslt>(this TArg arg, Func<TArg, TRslt> func) { return func(arg); } public static Func<T1, Func<T2, TResult>> Curry<T1, T2, TResult>(this Func<T1, T2, TResult> func) { Func<Func<T1, T2, TResult>, Func<T1, Func<T2, TResult>>> curried = f => x => y => f(x, y); return curried(func); } } This is quite verbose, requires explicit definition of the parameters and return type of the string.Join overload I want to use, and relies upon C#4's variance features because we are defining one of the arguments as IEnumerable rather than IEnumerable. The Challenge Can you find a neater way of achieving this using the method-chaining style of programming?

    Read the article

  • Why can't I set a cookie and redirect?

    - by Damian
    I´m having a problem setting a cookie and doing a 302 redirect In chrome the cookie is not being set (I haven't tested safari), in other browsers I was having the same problem until I added Path=/ to the cookie an now it works. This is how the header looks; the status is 302 Found Content-Type text/html; charset=iso-8859-1 Expires Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie alasca-flash=error-Message<Required<error-Name<Required<error-Sex<Required<error-Age<Required<;Path=/ Location /messages/sdf Content-Length 0 Server Jetty(6.1.x) Any idea on why the cookie is not set? Or any workaround? Thanks!

    Read the article

  • How to shutdown the UDC (usage data collection) from eclipse

    - by damian
    I want to shutdown the UDC. It's very heavy for my pc. I already uncheck the "Enable Capture" checkbox but I have the feeling that it stay enable in the background. It constantly ask me the user and password of the proxy. I do not want an eclipse always trying to connect to internet and doing background procesing that I don't need.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >