Search Results

Search found 56333 results on 2254 pages for 'set cookie'.

Page 7/2254 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Cookie/money/point clicker game origin?

    - by gavenkoa
    I can't find myself origin of Clicker like games. It's where the goal is to gain points through clicks and acquired enhancement. There's only one strategy in the game - deciding how efficiently spend point on enhancement (see formulas). I've seen many games like this, but it seems that most don't have a home page or have an unknown publisher. Some well known games of this type: Candy Box Cookie Clicker Cow Clicker Who is first implemented this idea (not only clicking but with investment model - when player must decide what improve to faster gather points)?

    Read the article

  • Gvim displays wrong font when set from _gvimrc, but correct font when set from menus

    - by dggoldst
    This question applies to gVim running on Windows. I have the following line in my _gvimrc set guifont=Lucida_Sans_Typewriter:h11:cANSI When gVim starts up, it strange italicizes everything! A call to :set guifont shows that things seem to have been set correctly, as it returns guifont=Lucida_Sans_Typewriter:h11:cANSI Then I manually select Edit-Select Font ... and then choose Lucida Sans Typewriter, and font size 11 and submit, the italics disappear and it looks fine. I've posted my _gvimrc for reference at http://vim.pastey.net/132157 So my questions are: Why am I getting different results from setting it manually and from _gvimrc? Is there a way to capture the command that the dialog box is sending back to the program? It might include extra commands that I'm missing.

    Read the article

  • problem getting info from a cookie with javascript

    - by Jason
    I am having an issue with my cookies and I can't figure it out. Basically I have it set up so it checks for the cookie to see if the user is logged in, and then displays either a welcome message or a login link. It works - except that instead of returning the persons name in the welcome message it just is blank where the name should be. The cookie is there, with all the appropriate info.. not sure what I am doing wrong. var itm = new Array(); itm[0] = findCookie("ui"); if (itm[0] == null) { document.write("<h2><a href='logreg.html'>Log In or Sign Up</a></h2>"); } else { var c1 = itm[0].indexOf(","); var c2 = itm[0].indexOf(",",c1); var c3 = itm[0].indexOf(",",c2); var gname = itm[0].substring(c2,c3); document.write("<h2>Welcome "+gname+"!</h2>"); } The findCookie function is.. function findCookie(val){ var cookie = null; var findVal = val + "="; var dc = document.cookie; if (dc.length > 0) { var start = dc.indexOf(findVal); if (start >= 0) { start += findVal.length; lastVal = dc.indexOf(";", start); if (lastVal == -1) { lastVal = dc.length; } cookie = (dc.substring(start, lastVal)); } else { return cookie; } } return cookie; }

    Read the article

  • C - How to implement Set data structure?

    - by psihodelia
    Is there any tricky way to implement a set data structure (a collection of unique values) in C? All elements in a set will be of the same type and there is a huge RAM memory. As I know, for integers it can be done really fast'N'easy using value-indexed arrays. But I'd like to have a very general Set data type. And it would be nice if a set could include itself.

    Read the article

  • C++: set of C-strings

    - by Nicholas
    I want to create one so that I could check whether a certain word is in the set using set::find However, C-strings are pointers, so the set would compare them by the pointer values by default. To function correctly, it would have to dereference them and compare the strings. I could just pass the constructor a pointer to the strcmp() function as a comparator, but this is not exactly how I want it to work. The word I might want to check could be part of a longer string, and I don't want to create a new string due to performance concerns. If there weren't for the set, I would use strncmp(a1, a2, 3) to check the first 3 letters. In fact, 3 is probably the longest it could go, so I'm fine with having the third argument constant. Is there a way to construct a set that would compare its elements by calling strncmp()? Code samples would be greatly appreciated.

    Read the article

  • AS3: Adding get/set methods to a class via prototype

    - by LiraNuna
    I'm looking for a way to extend a class via prototype by adding a get and set functions. The following code will add a function to the class' prototype: MyClass.prototype.newMethod = function(... args) { }; However I want to add both a get and set functions. I tried: MyClass.prototype.fakeProperty = get function(... args) { }; MyClass.prototype.fakeProperty = set function(... args) { }; But that seem to throw compile errors. Is this even possible? Is there some 'internal' naming convention for get/set functions? I am not looking for answers such as 'create a new class and new get/set functions there'.

    Read the article

  • Can two different browser share on cookie?

    - by Hiscal
    Hi Friends My requirement is pretty interesting, I want to maintain one cookie between two different browser for same domain. so lets say I have create one cookie with name "mydata" and value "hiscal" from IE, then if i browse same website from firefox and trying to read cookie "mydata" then system should give me value "hiscal" but this is not happen in general case so can any one tell me how i can share cookie between to different browser(client) of same domain. Thanks, Hiscal

    Read the article

  • Setting Cookie Port

    - by MasterMax1313
    I'm trying to set the port on a cookie in ASP.NET (code below), but I'm getting a very unusual error at runtime (below the code). Any thoughts? target.Cookie = new Cookie { Comment = "Test Comment", CommentUri = new System.Uri("http://www.tempuri.org"), Discard = false, Domain = "tempuri.com", Expired = false, Expires = new DateTime(2015, 12, 31), HttpOnly = false, Name = "TestCookie", Path = "/", Port = "443", Secure = false, Value = "Test Value", Version = 1, }; Exception: System.Net.CookieException: The 'Port'='443' part of the cookie is invalid..

    Read the article

  • jQuery cookie control

    - by Happy
    How to create cookie, which will work on all pages over choosen site? Using cookie plugin. Code must add cookie "movie_check" with value "no", which can be used over all pages on site "www.site.com" (were script is implemented). Expires after 365 days. Tryed this (doesnt work): $.cookie("movie_check", "no", {expires: 365, domain: 'www.site.com'}); Thanks.

    Read the article

  • Why won't haproxy capture my cookie?

    - by mike
    I'm having trouble getting frontend cookie capture to work in haproxy. I have this in my config: frontend frontend 0.0.0.0:9999 [snip] capture cookie foo len 10 Then I use nc to talk directly to the server and send it: GET / HTTP/1.1 Cookie: foo=bar I get a log line, but there's a "-" where the captured cookie should be.

    Read the article

  • SET game odds simulation (MATLAB)

    - by yuk
    Here is an interesting problem for your weekend. :) I recently find the great card came - SET. Briefly, there are 81 cards with the four features: symbol (oval, squiggle or diamond), color (red, purple or green), number (one, two or three) or shading (solid, striped or open). The task is to find (from selected 12 cards) a SET of 3 cards, in which each of the four features is either all the same on each card or all different on each card (no 2+1 combination). In my free time I've decided to code it in MATLAB to find a solution and to estimate odds of having a set in randomly selected cards. Here is the code: %% initialization K = 12; % cards to draw NF = 4; % number of features (usually 3 or 4) setallcards = unique(nchoosek(repmat(1:3,1,NF),NF),'rows'); % all cards: rows - cards, columns - features setallcomb = nchoosek(1:K,3); % index of all combinations of K cards by 3 %% test tic NIter=1e2; % number of test iterations setexists = 0; % test results holder % C = progress('init'); % if you have progress function from FileExchange for d = 1:NIter % C = progress(C,d/NIter); % cards for current test setdrawncardidx = randi(size(setallcards,1),K,1); setdrawncards = setallcards(setdrawncardidx,:); % find all sets in current test iteration for setcombidx = 1:size(setallcomb,1) setcomb = setdrawncards(setallcomb(setcombidx,:),:); if all(arrayfun(@(x) numel(unique(setcomb(:,x))), 1:NF)~=2) % test one combination setexists = setexists + 1; break % to find only the first set end end end fprintf('Set:NoSet = %g:%g = %g:1\n', setexists, NIter-setexists, setexists/(NIter-setexists)) toc 100-1000 iterations are fast, but be careful with more. One million iterations takes about 15 hours on my home computer. Anyway, with 12 cards and 4 features I've got around 13:1 of having a set. This is actually a problem. The instruction book said this number should be 33:1. And it was recently confirmed by Peter Norvig. He provides the Python code, but I didn't test it. So can you find an error?

    Read the article

  • Whats the best to way convert a set of Java objects to another set of objects?

    - by HDave
    Basic Java question here from a real newbie. I have a set of Java objects (of class "MyClass") that implement a certain interface (Interface "MyIfc"). I have a set of these objects stored in a private variable in my class that is declared as follows: protected Set<MyClass> stuff = new HashSet<MyClass>(); I need to provide a public method that returns this set as a collection of objects of type "MyIfc". public Collection<MyIfc> getMyStuff() {...} How do I do the conversion? The following line gives me an error that it can't do the conversion. I would have guessed the compiler knew that objects of class MyClass implemented MyIfc and therefore would have handled it. Collection<MyIfc> newstuff = stuff; Any enlightenment is appreciated.

    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

  • Problems with retrieving the correct cookie in Java

    - by Spines
    When I retrieve the cookies in my java servlet, all of the values from getPath() are null. So if a cookie with the same name is set in directory /foo, and at the root directory, I retrieve two cookies with the same exact name, but I can't differentiate them because getPath() returns null for both. I looked in firebug and saw that firefox was not sending anythign for the path. My application uses a "rememberme" cookie with the path set to "/". Everything works fine as long as there is only one cookie with name rememberme. But if somehow another cookie gets set with the same name on a different path like /foo, then my application won't know which one is the one I set for the root. How can I differentiate the cookies? Do I need to worry about a cookie existing with the same name in a subdir, or can I just assume there will be only the one I set?

    Read the article

  • Get objc_exception_throw when setting cookie with ASIHTTPRequest

    - by TuanCM
    I got objc_exception_throw when trying to set cookies for a ASIHTTPRequest request. I tried both of these but it didn't work out. ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:url]; NSMutableDictionary *properties = [[NSMutableDictionary alloc] init]; [properties setValue:@".google.com" forKey:@"Domain"]; [properties setValue:@"/" forKey:@"path"]; [properties setValue:@"1600000000" forKey:@"expires"]; NSHTTPCookie *cookie = [[NSHTTPCookie alloc] initWithProperties:properties]; [request setRequestCookies:[NSMutableArray arrayWithObject:cookie]]; or replacing initiating code for cookie with this one NSHTTPCookie *cookie = [[NSHTTPCookie alloc] init]; When I commented out the following line, everything worked fine. [request setRequestCookies:[NSMutableArray arrayWithObject:cookie]]; Can you guys tell me what the problem here!

    Read the article

  • browser cookie issue

    - by George2
    Hello everyone, In my previous understanding, for a web site, only login user of a web site (no matter what login/authentication approach is used) could have cookie as persistent identifier, so that if the user close the browser, open browser again to go to the same web site, the web site could remember the user. But I learned recently that it seems for non-login user, there could still be a cookie associated with the user (after the user close browser, and then open the browser again to go to the same web site, the web site could remember the user), and it is called browser cookie? Is that true? If it is true, who is responsible to set the browser cookie? i.e. need some coding/config at web server side, client browser configuration (without coding from server side), or both? How could web server access such cookie? Appreciate if any code samples. thanks in advance, George

    Read the article

  • Safari javascript cookie issue

    - by Aaron Moodie
    I've hit a bit of a weird issue in Safari in regards to setting a js cookie. The cookie itself is just a rgb colour value, which gets set using .click(), and is working fine in Chrome and Firefox, yet in Safari the value of the cookie is incomplete, showing up as rgb(193 instead of rgb(193, 184, 76) as the other browsers do. The jQuery function I'm using to set the cookie is: $('.project_link a').click(function() { var link_colour = $(this).css("color"); document.cookie = "colour="+link_colour+";expires=;path=/"; });

    Read the article

  • $_COOKIE['cookiefoo'], try to get a cookie

    - by Felix Guerrero
    Hi, I'm newbie with webapps and PHP. I'm trying to get a cookie that it's not created yet, I mean, when I try to load a page that looks for a inexistent cookie I get an error, I tried to get rid of this with a try/catch but not success. This this the code I'm trying: try{ $cookie = $_COOKIE['cookiefoo']; if($cookie){ //many stuffs here } else throw new Exception("there is not a cookie"); } catch(Exception $e){ } How can I achieve this, any ideas, it would be appreciated it.

    Read the article

  • Deleting a cookie in Javascript not working

    - by DisgruntledGoat
    I have a site where authentication is done externally (which I can't access), so I'm creating a cookie on login in order to display a welcome message to the user. Creating the cookie works fine, I write to document.cookie when the login form submits. But deleting the cookie doesn't work. Here's my code (logout.php does the external authentication stuff): <a href="http://external.com/logout.php" style="float:right" onclick="document.cookie='BRLOG=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.example.com;'">Logout</a>

    Read the article

  • Data structure to build and lookup set of integer ranges

    - by actual
    I have a set of uint32 integers, there may be millions of items in the set. 50-70% of them are consecutive, but in input stream they appear in unpredictable order. I need to: Compress this set into ranges to achieve space efficient representation. Already implemented this using trivial algorithm, since ranges computed only once speed is not important here. After this transformation number of resulting ranges is typically within 5 000-10 000, many of them are single-item, of course. Test membership of some integer, information about specific range in the set is not required. This one must be very fast -- O(1). Was thinking about minimal perfect hash functions, but they do not play well with ranges. Bitsets are very space inefficient. Other structures, like binary trees, has complexity of O(log n), worst thing with them that implementation make many conditional jumps and processor can not predict them well giving poor performance. Is there any data structure or algorithm specialized in integer ranges to solve this task?

    Read the article

  • Pair equal operator overloading for inserting into set

    - by Petwoip
    I am trying to add a pair<int,int> to a set. If a pair shares the same two values as another in the set, it should not be inserted. Here's my non-working code: typedef std::pair<int, int> PairInt; template<> bool std::operator==(const PairInt& l, const PairInt& r) { return (l.first == r.first && l.second == r.second) || (l.first == r.second && l.second == r.first); } int main() { std::set<PairInt> intSet; intSet.insert(PairInt(1,3)); intSet.insert(PairInt(1,4)); intSet.insert(PairInt(1,4)); intSet.insert(PairInt(4,1)); } At the moment, the (4,1) pair gets added even though there is already a (1,4) pair. The final contents of the set are: (1 3) (1 4) (4 1) and I want it to be (1 3) (1 4) I've tried putting breakpoints in the overloaded method, but they never get reached. What have I done wrong?

    Read the article

  • Setting Path and Expiration for session cookie in asp.net

    - by Sergej Andrejev
    Anything I have tried didn't work. Currenly I have following code to change asp.net session cookie expiration date and path, but asp doesn't want to listen to me. I sends same cookie in Set-Cookie header two times sometimes, sometimes it sends it's default cookie ignoring path and expiration date, sometimes it sends everything as expected, and sometimes it doesn't send Set-Cookie at all. What should I do. This drives me nuts :( My code in Global.asax protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e) { /// only apply session cookie persistence to requests requiring session information if (Context.Handler is IRequiresSessionState || Context.Handler is IReadOnlySessionState) { var sessionState = ConfigurationManager.GetSection("system.web/sessionState") as SessionStateSection; var cookieName = sessionState != null && !string.IsNullOrEmpty(sessionState.CookieName) ? sessionState.CookieName : "ASP.NET_SessionId"; var timeout = sessionState != null ? sessionState.Timeout : TimeSpan.FromMinutes(20); /// Ensure ASP.NET Session Cookies are accessible throughout the subdomains. if (Request.Cookies[cookieName] != null && Session != null && Session.SessionID != null) { Response.Cookies[cookieName].Value = Session.SessionID; Response.Cookies[cookieName].Path = Request.ApplicationPath; Response.Cookies[cookieName].Expires = DateTime.Now.Add(timeout); } } }

    Read the article

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