Search Results

Search found 91 results on 4 pages for 'alexis kennedy'.

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

  • ASP.NET 3.5 Web Site stopped importing System namespace by default

    - by Alexis
    I have a VB Web Site project that has recently (and mysteriously) stopped importing the "System" namespace by default. I'm having to either place a "Imports System" line at the top of each code behind, or preface everything with "System", which is fairly annoying, not to mention redundant. I can't for the life of me figure out how to get the System namespace back to being imported by default. I've already checked to see that WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config contains the <add namespace="System"/> line--it does. That was my best lead. I'm tearing my hair out. Does anyone have any suggestions?

    Read the article

  • How to imitate focus on a div element?

    - by Alexis Abril
    The scenario involves imitating a drop down list. Instead of the standard input select element, we're using a set of custom images in combination with a few CSS styles and jQuery behaviors. All in all, we have a drop down list that works just fine. The question revolves around a drop down list losing focus. A normal select element losing focus would automatically close the list, however, since we are using a set of divs, it's not possibly to set or lose focus(and subsequently hide the list). We've been able to imitate normal drop down behavior by hiding a text input behind the div and setting the focus to it dynamically. For example: User clicks drop down list - content list is displayed and hidden text input is set as focus. Event is bound to the text input losing focus which hides the content list. I'm curious if the community has a better approach to hiding a div when a user clicks off, presses escape, etc.

    Read the article

  • What is the correct usage of blueprint-typography-body([$font-size])?

    - by Alexis Abril
    Recent convert to RoR and I've been using Compass w/ Blueprint to dip into the proverbial pool. Compass has been fantastic, but I've come across something strange within the Typography library. The blueprint-typography-body mixin contains the following: =blueprint-typography-body($font-size: $blueprint-font-size) line-height: 1.5 +normal-text font-size: 100% * $font-size / 16px My question revolves around "font-size." I'm a bit lost, as I would expect to pass in a font size and have that size reflected upon page load. However, in this scenario the formula seems to dictate a percentage against the default font. ie: +blueprint-typography-body(10px) //produces 7.5px off of the default font size of 12px from what I can tell. In essence, I'm curious if there is a standard to setting font size within Compass other than explicitly declaring "font-size: 10px". Note: The reason I'm leaning towards Blueprint/Compass font stylings is due to the standardization of line-heights, fonts and colors.

    Read the article

  • VEMap and a GeoRSS feed(hosted separately)

    - by Alexis Abril
    The scenario is as follows: A WCF web service exists that outputs a valid GeoRSS feed. This lives in its own domain as a number of different applications have access to it. A web page(on a different site) has been created with an instance of a VEMap(Bing/Virtual Earth map object). Now, VEMap can accept an input feed in this format via the following: var layer = new VEShapeLayer(); var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, "someurl", layer); map.ImportShapeLayerData(veLayerSpec, onComplete, true); onComplete is a callback function I'm using to replace the default pin graphic with something custom. The question is in regards to "someurl", which is a path to a local xml file containing the geographic information(georss simple format). I've realized this feed and the map must be hosted in the same domain, so I've created a generic handler that reads the remote feed and returns it in the same format. var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, "/somelocalhandler.ashx", layer); When I do this, I get the VEMap error("z is null"). This is the same error one would receive when trying to access a remote feed. When I copy the feed into a local xml file(ie, "feed.xml") there is no error. The order of operations is currently: remote feed - local handler - VEMap import If I'm over complicating this procedure, let me know! I'm a bit new to the Bing Maps API and might have missed something. Any assistance is appreciated.

    Read the article

  • How can I detect when a file download has completed in ASP.NET?

    - by Alexis
    I have a popup window that displays "Please wait while your file is being downloaded". This popup also executes the code below to start the file download. How can I close the popup window once the file download has completed? I need some way to detect that the file download has completed so I can call self.close() to close this popup. System.Web.HttpContext.Current.Response.ClearContent(); System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.ClearHeaders(); System.Web.HttpContext.Current.Response.ContentType = fileObject.ContentType; System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", string.Concat("attachment; filename=", fileObject.FileName)); System.Web.HttpContext.Current.Response.WriteFile(fileObject.FilePath); Response.Flush(); Response.End();

    Read the article

  • "Session is Closed!" - NHibernate

    - by Alexis Abril
    This is in a web application environment: An initial request is able to successfully complete, however any additional requests return a "Session is Closed" response from the NHibernate framework. I'm using a HttpModule approach with the following code: public class MyHttpModule : IHttpModule { public void Init(HttpApplication context) { context.EndRequest += ApplicationEndRequest; context.BeginRequest += ApplicationBeginRequest; } public void ApplicationBeginRequest(object sender, EventArgs e) { CurrentSessionContext.Bind(SessionFactory.Instance.OpenSession()); } public void ApplicationEndRequest(object sender, EventArgs e) { ISession currentSession = CurrentSessionContext.Unbind( SessionFactory.Instance); currentSession.Dispose(); } public void Dispose() { } } SessionFactory.Instance is my singleton implementation, using FluentNHibernate to return an ISessionFactory object. In my repository class, I attempt to use the following syntax: public class MyObjectRepository : IMyObjectRepository { public MyObject GetByID(int id) { using (ISession session = SessionFactory.Instance.GetCurrentSession()) return session.Get<MyObject>(id); } } This allows code in the application to be called as such: IMyObjectRepository repo = new MyObjectRepository(); MyObject obj = repo.GetByID(1); I have a suspicion my repository code is to blame, but I'm not 100% sure on the actual implementation I should be using. I found a similar issue on SO here. I too am using WebSessionContext in my implementation, however, no solution was provided other than writing a custom SessionManager. For simple CRUD operations, is a custom session provider required apart from the built in tools(ie WebSessionContext)?

    Read the article

  • CSS3 transition on table row using height property

    - by Alexis Leclerc
    I have an HTML table displaying some information with a few rows. On each row, the user can click to reveal some additional rows that contains information related to the clicked row. Something like this: While the additional rows are being created with an AJAX request, a loading row is inserted right after the clicked row : Currently, everything works perfectly (drill down style), but I would like to add some animation to the loading row. I found a question ( this one ) that has a JSFiddle showing kind of what I want ( this fiddle ). I tried to implement something similar with CSS3 transitions, but I can't get it to work. Here's my simulated attempt ( fiddle only for deployment of the loading row ) using these transitions : -webkit-transition: height 0.1s ease-in-out; -moz-transition: height 0.1s ease-in-out; -ms-transition: height 0.1s ease-in-out; -o-transition: height 0.1s ease-in-out; transition: height 0.1s ease-in-out; Any thought on why my fiddle doesn't do any animation? Any other methods you would propose? Thanks!

    Read the article

  • Android - Loop Through strings.xml file

    - by Alexis Cartier
    I was wondering if there is anyway to loop through the strings.xml file. Let's say that I have the following format: <!-- FIRST SECTION --> <string name="change_password">Change Password</string> <string name="change_server">Change URL</string> <string name="default_password">password</string> <string name="default_server">http://xxx:8080</string> <string name="default_username">testPhoneAccount</string> <!-- SECOND SECTION --> <string name="debug_settings_category">Debug Settings</string> <string name="reload_data_every_startup_pref">reload_data_every_startup</string> <string name="reload_data_on_first_startup_pref">reload_data_on_first_startup</string> Now let's say I have this: private HashMap<String,Integer> hashmapStringValues = new HashMap<String, Integer>(); Is there a way to iterate only in the second section of my xml file? Maybe wrap the section with a tag like <section2> and then iterate through it? public void initHashMap(){ for (int i=0;i< ???? ;i++) //Here I need to loop only in the second section of my xml file { String nameOfTag = ? // Here I get the name of the tag int value = R.string.nameOfTag // Here I get the associated value of the tag this.hashmapStringValues.put(nameOfTag,value); } }

    Read the article

  • Do you know of a C macro to compute Unix time and date?

    - by Alexis Wilke
    I'm wondering if someone knows/has a C macro to compute a static Unix time from a hard coded date and time as in: time_t t = UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13); I'm looking into that because I want to have a numeric static timestamp. This will be done hundred of times throughout the software, each time with a different date, and I want to make sure it is fast because it will run hundreds of times every second. Converting dates that many times would definitively slow down things (i.e. calling mktime() is slower than having a static number compiled in place, right?) [made an update to try to render this paragraph clearer, Nov 23, 2012] Update I want to clarify the question with more information about the process being used. As my server receives requests, for each request, it starts a new process. That process is constantly updated with new plugins and quite often such updates require a database update. Those must be run only once. To know whether an update is necessary, I want to use a Unix date (which is better than using a counter because a counter is much more likely to break once in a while.) The plugins will thus receive an update signal and have their on_update() function called. There I want to do something like this: void some_plugin::on_update(time_t last_update) { if(last_update < UNIX_TIMESTAMP(2010, 3, 22, 20, 9, 26)) { ...run update... } if(last_update < UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13)) { ...run update... } // as many test as required... } As you can see, if I have to compute the unix timestamp each time, this could represent thousands of calls per process and if you receive 100 hits a second x 1000 calls, you wasted 100,000 calls when you could have had the compiler compute those numbers once at compile time. Putting the value in a static variable is of no interest because this code will run once per process run. Note that the last_update variable changes depending on the website being hit (it comes from the database.) Code Okay, I got the code now: // helper (Days in February) #define _SNAP_UNIX_TIMESTAMP_FDAY(year) \ (((year) % 400) == 0 ? 29LL : \ (((year) % 100) == 0 ? 28LL : \ (((year) % 4) == 0 ? 29LL : \ 28LL))) // helper (Days in the year) #define _SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) \ ( \ /* January */ static_cast<qint64>(day) \ /* February */ + ((month) >= 2 ? 31LL : 0LL) \ /* March */ + ((month) >= 3 ? _SNAP_UNIX_TIMESTAMP_FDAY(year) : 0LL) \ /* April */ + ((month) >= 4 ? 31LL : 0LL) \ /* May */ + ((month) >= 5 ? 30LL : 0LL) \ /* June */ + ((month) >= 6 ? 31LL : 0LL) \ /* July */ + ((month) >= 7 ? 30LL : 0LL) \ /* August */ + ((month) >= 8 ? 31LL : 0LL) \ /* September */+ ((month) >= 9 ? 31LL : 0LL) \ /* October */ + ((month) >= 10 ? 30LL : 0LL) \ /* November */ + ((month) >= 11 ? 31LL : 0LL) \ /* December */ + ((month) >= 12 ? 30LL : 0LL) \ ) #define SNAP_UNIX_TIMESTAMP(year, month, day, hour, minute, second) \ ( /* time */ static_cast<qint64>(second) \ + static_cast<qint64>(minute) * 60LL \ + static_cast<qint64>(hour) * 3600LL \ + /* year day (month + day) */ (_SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) - 1) * 86400LL \ + /* year */ (static_cast<qint64>(year) - 1970LL) * 31536000LL \ + ((static_cast<qint64>(year) - 1969LL) / 4LL) * 86400LL \ - ((static_cast<qint64>(year) - 1901LL) / 100LL) * 86400LL \ + ((static_cast<qint64>(year) - 1601LL) / 400LL) * 86400LL ) WARNING: Do not use these macros to dynamically compute a date. It is SLOWER than mktime(). This being said, if you have a hard coded date, then the compiler will compute the time_t value at compile time. Slower to compile, but faster to execute over and over again.

    Read the article

  • Java Spotlight Episode 58: Peter Korn and Ofir Leitner on ME Accessibility

    - by Roger Brinkley
    Tweet Interview with Peter Korn and Ofir Leitner on Mobile and Embedded Accessibility. Joining us this week on the Java All Star Developer Panel are Dalibor Topic, Java Free and Open Source Software Ambassador and Alexis Moussine-Pouchkine, Java EE Developer Advocate. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link: Java Spotlight Podcast in iTunes. Show Notes News Announcing Oracle WebLogic 12c Geronimo 3 beta - Another Apache project now compatible with Java EE 6 NetBeans 7.1 RC1 is out JavaFX links of the weeks JavaFX videos on Parleys: Nicolas Lorain's Introduction to JavaFX 2.0 from JavaOne 2011 & Richard Bair on JavaFX Architecture and Programming Model Events Dec 4, SOUJava Geek Bike Ride 2011, Sao Paulo  Dec 5-7, UKOUG, Birmingham, UK Dec 6-8, Java One Brazil, Sao Paulo Dec 9 UAIJUG, Uberlandia Dec 9 CEJUG, Fortaleza/CE Dec 10 GUJAVA, Florianopolis Dec 10 ALJUG, Maceio/AL Dec 11 Javaneiros, Campo Grande/MS Dec 12 GOJAVA, Goiania/GO Dec 13 RioJUG, Rio de Janeiro Feature interview Peter Korn is Oracle's Accessibility Principal – their senior individual contributor on accessibility. He is also Technical Manager of the AEGIS project, leading an EC-funded €12.6m investment building accessibility into future mainstream ICT (FP7-ICT224348). Mr. Korn co-developed and co-implemented the Java Accessibility API, and developed the Java Access Bridge for Windows. He helped design the open source GNOME Accessibility architecture found on most modern UNIX and GNU/Linux systems, and consulted on accessibility support for OpenOffice.org, Firefox, Thunderbird, and other applications. Prior to Sun/Oracle, Peter co-developed the outSPOKEN for Windows screen reader. Mr. Korn represented Sun/Oracle on TEITAC for the Section 508/255 refresh, co-led the OASIS ODF Accessibility subcommittee, and sits on INCITS V2 where he is contributing to ISO 13066: defining AT-IT interoperability standards including specifically the Java Accessibility API. Ofir Leitner is the architect of one of LWUIT's key features - the HTMLComponent which allows rendering HTML within LWUIT applications and to embed web-flows inside apps. Ofir is also responsible for LWUIT's bidirectional and RTL support and for the accessibility work that is being done these days in LWUIT. Mail Bag What's Cool Devoxx 2011 (Alexis) Eclipsecon Europe Talk by Andrew Overholt: IcedTea & IcedTea-Web Geek bike ride & Rio 500 Twitter followers @JavaSpotlight Show Transcripts Transcript for this show is available here when available.

    Read the article

  • How Does PowerPoint Play In A Great Presentation?

    ?Four score and seven years ago?? Abraham Lincoln?s famous Gettysburg address. ?Ask not what your country can do for you, but what you can do for your country.? John F. Kennedy?s famous address to t... [Author: Anne Warfield - Computers and Internet - June 10, 2010]

    Read the article

  • Can't get gitosis and ssh to play nice on cygwin

    - by Noel Kennedy
    I have followed this guide to setting up gitosis on a windows 2003 server via cygwin. I have now got to a point where it largely works. I can clone, pull and push. The problem I am having is that I think I have not got the ssh bit right at all. When I connect via msysgit from machines and accounts where I have not created or uploaded ssh keys it works. Every time I clone, pull or push I get a password challenge for the 'git' user running on the server but basically I can execute git commands. When I connect with users with an ssh key in the ~/.ssh folder, I don't get the password challange and instead I get a permissions failure: DEBUG:gitosis.serve.main:Got command "git-upload-pack '/cris.git'" DEBUG:gitosis.access.haveAccess:Access check for 'teamcity@hhit24808' as 'writable' on 'cris.git'... DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'cris.git', new value 'cris' DEBUG:gitosis.access.haveAccess:Access check for 'teamcity@hhit24808' as 'writeable' on 'cris.git'... DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'cris.git', new value 'cris' DEBUG:gitosis.access.haveAccess:Access check for 'teamcity@hhit24808' as 'readonly' on 'cris.git'... DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'cris.git', new value 'cris' ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly I have uploaded the public rsa key into the key_dir folder. Here is my conf file: [gitosis] loglevel = DEBUG [group gitosis-admin] writable = gitosis-admin members = myemail@mydomain [group cris-developers] members = myemail@mydomain TeamCity@HHIT24808 writable = cris If it matters, I have generated a key without a passphrase as I believe this is necessary to enable ssh for automated scripts. When I use keys with a passphrase, I get challanged for the phrase but then get the same permissions problem. I have tried 'writable' and 'writeable' for permissions. Help!! Update 1: When I try to clone a non-existant repo, I get the same error message, co-incidence? Update 2: Wierd, I've got one machine and one login working. It seems to be something to do with the syntax for addressing git over ssh. This now works on one machine for one login: git clone git@servername:cris.git The same command fails for a user on another machine without an uploaded ssh key. But this command works (after being challanged for git@servername's password) git clone git@servername:/home/git/repositories/cris.git neither command works on a 2nd login whose ssh key has been uploaded

    Read the article

  • Why does GetSqlDecimal throw when GetDecimal doesn't?

    - by I. J. Kennedy
    I have a database table that has a column of type money, allowing nulls. Using a SqlDataReader named reader, I can do decimal d = reader.GetDecimal(1); which works, unless of course we're reading a null. If I try using SqlDecimal instead--and I thought the whole point of the SqlTypes was to deal with nulls--then I get an invalid cast, whether or not the value is null. SqlDecimal s = reader.GetSqlDecimal(1); // throws an invalid cast exception What am I doing wrong? Do I really have to write a conditional statement to shepherd the value from the database to a SqlDecimal variable?

    Read the article

  • C# Request not timing out

    - by Joel Kennedy
    I have this code which runs in a BackgroundWorker, and should make a POST request to the server and get a response. It works fine when it is supposed to work, but when I try to induce a 404 error it doesn't catch the error reporting system. loginProcess.DoWork += delegate(object s, DoWorkEventArgs args) { // loginProcess BackgroundWorker try { // Try to login, if error, report loginProcess.ReportProgress(10); String method = "POST"; String postdata = "postdata=test"; String url = "http://localhost/dev/login.php"; loginProcess.ReportProgress(15); WebRequest rqst = HttpWebRequest.Create(url); rqst.Timeout = 5000; ((HttpWebRequest)rqst).KeepAlive = true; loginProcess.ReportProgress(20); //rqst.Timeout = this.Timeout; // only needed, if you use HTTP AUTH //CredentialCache creds = new CredentialCache(); //creds.Add(new Uri(url), "Basic", new NetworkCredential(this.Uname, this.Pwd)); //rqst.Credentials = creds; rqst.Method = method; if (!String.IsNullOrEmpty(postdata)) { //rqst.ContentType = "application/xml"; rqst.ContentType = "application/x-www-form-urlencoded"; loginProcess.ReportProgress(30); byte[] byteData = UTF8Encoding.UTF8.GetBytes(postdata); loginProcess.ReportProgress(40); rqst.ContentLength = byteData.Length; loginProcess.ReportProgress(50); using (Stream postStream = rqst.GetRequestStream()) { loginProcess.ReportProgress(50); postStream.Write(byteData, 0, byteData.Length); loginProcess.ReportProgress(60); postStream.Close(); loginProcess.ReportProgress(70); rqst.GetResponse().Close(); rqst.GetRequestStream().Close(); } } loginProcess.ReportProgress(90); using (var response1 = rqst.GetResponse()) { using (var responseStream1 = response1.GetResponseStream()) { using (var reader1 = new StreamReader(responseStream1)) { //StreamReader rsps = new StreamReader(rqst.GetResponse().GetResponseStream()); string strRsps = reader1.ReadToEnd(); loginProcess.ReportProgress(95); loginVars = strRsps; //rqst. //reader1.Close(); //rsps.Dispose(); } args.Result = "SUCCESS"; } } } catch(WebException err) { // Catch error and put into err variable if(err.Status == WebExceptionStatus.ProtocolError) { // If something is wrong with protocol LoginReporting.ErrorName = Convert.ToString(((HttpWebResponse)err.Response).StatusCode); LoginReporting.ErrorDescription = Convert.ToString(((HttpWebResponse)err.Response).StatusDescription); LoginReporting.ErrorNotes = "Error when logging in, Server returned: " + Convert.ToString(((HttpWebResponse)err.Response).StatusCode); LoginReporting.ErrorLocation = "LoginRequest.ProtocolError"; args.Result = "ERROR"; //MessageBox.Show(Convert.ToString(((HttpWebResponse)err.Response).StatusCode)); //MessageBox.Show(Convert.ToString(((HttpWebResponse)err.Response).StatusDescription)); } else { args.Result = "ERROR"; } } catch(Exception err) { // Catch unhandled error LoginReporting.ErrorName = Convert.ToString(err); LoginReporting.ErrorDescription = Convert.ToString(err.Message); LoginReporting.ErrorNotes = "Error when logging in, Server returned: " + Convert.ToString(err.Message); LoginReporting.ErrorLocation = "LoginRequest.ProtocolError"; args.Result = "ERROR"; } }; I have put a timeout on the request but it just doesn't work! Is this a bug, or am I doing something wrong here? Thanks

    Read the article

  • compiling actionscript from command line using MXMLC

    - by I. J. Kennedy
    I have a tiny actionscript "project" consisting of two files, call them foo.as and bar.as. For reasons I won't go into, I really really want to build the .SWF from the command line, without setting up a formal project of any kind. Every compiler I've ever used lets you do this, but for the life of me I can't figure out how to coerce MXMLC into compiling these two files and linking them into a SWF. Naively, I try MXMLC foo.as bar.as but I'm informed that only one source file is allowed. Ok, supposing I compiled these two files separately, how would I link them together to get the final SWF? NOTE: The only reason I have two files instead of one is the requirement of only one class per file. I tried putting both classes in one file and making one of the classes "private" or "internal" but neither of these ideas worked. I would be ecstatic to find out I can put more than one class in a file (with only one being public).

    Read the article

  • Git on windows, is it truly distributed?

    - by Noel Kennedy
    I am just starting out with git on the Windows platform. I have mysygit installed and bar a few hiccups I am 'git'ing away nicely. However, I must be missing something because I don't understand how two msysgit clients on different Windows machines can push and pull to each other directly? I am a complete linux noob but I think I can see that the ssh thing allows distribution on linux. However, the msysgit client appears just to be additional commands in the windows cmd prompt and there is no windows service element. If I try git clone 'MyMatesPc' who is going to be listening to this request at the other end? I can see that if you have a 'central' server running git on linux (or cygwin), you can share commits by pushing them onto the 'central' repo from one machine, then pulling them down onto another. This effectively means that you are having to use a central server. I don't have a problem with this, but wanted to check that I am not missing anything!

    Read the article

  • Can I flip the coordinate system without flipping text in iTextSharp?

    - by I. J. Kennedy
    I have some chart-creating code written for a coordinate system in which a y-coordinate of 0 is the top of the page. We are now converting to iTextSharp, which uses the conventional system from mathematics where a y-coordinate of 0 is the bottom of the page. There are many calculations involved in producing the chart and I'd like to not mess with those calculations. I can partially "fix" the problem by transforming iTextSharp's coordinate system like this: pdfContentByte.ConcatCTM(1f, 0f, 0f, -1f, 0f, pdfDoc.PageSize.Height); This works great for lines, rectangles, and circles, but the text is now upside down! Is there a way to remedy this, using SetTextMatrix or otherwise?

    Read the article

  • How can a Windows program temporarily change its time zone?

    - by Rob Kennedy
    I've written a function to return the time_t value corresponding to midnight on a given day. When there is no midnight for a given day, it returns the earliest time available; that situation can occur, for example, when Egypt enters daylight-saving time. This year, the time change takes effect at midnight on the night of April 29, so the clock goes directly from 23:59 to 01:00. Now I'm writing unit tests for this function, and one of the tests should replicate the Egypt scenario. In Unix, I can accomplish it like this: putenv("TZ", "Egypt", true); tzset(); After doing that, further calls to localtime behave as if they're in Egypt instead of Minnesota, and my tests pass. Merely setting the environment variable doesn't have any effect on Windows, though. What can I do to make the unit test think it's somewhere else without affecting the rest of the programs running on the system?

    Read the article

  • Browser PDF File Previwer(Google Style)

    - by Odero Kennedy
    Hi All, I am working on an application which needs to preview privileged content in the browser. The preview should work in a way that its NOT possible to download the content. Only reading within the browser is allowed. I have looked at google docs preview but it needs the url of the docs to accessible online. I need to work with content in the intranet The previewer should not mandate the installation of a pluggin as this would limit the access. Any hints

    Read the article

  • Disable designer in Visual Studio?

    - by I. J. Kennedy
    I'm using Visual C# Express to write Windows Form applications, and call me old school, but I don't like the designer. It is a nuisance and pollutes my project with lots of unwanted files, as well as unwanted monkey-generated source code. Please please please tell me there's a way to turn it off completely.

    Read the article

  • javascript, php, cookies

    - by kennedy
    When i declare mac = 123, my internet explorer and firefox will keep refresh non-stop. And if i declare mac = getMacAddress it returns a value 1... I'm able to do a document.write(getMacAddress()) and it would able to display the mac address nicely. 1) Why my explorer will keep refreshing non-stop when i code it manually with "123" 2) why is the document.write able to display out, and when i store it to the cookie, somehow it didnt mange to capture into the cookie and it return a value of "1". Anyone help? create_users.php <script language="JavaScript"> function getMacAddress(){ document.macaddressapplet.setSep( "-" ); return (document.macaddressapplet.getMacAddress()); } function setCookie(c_name,value) { document.cookie = c_name + "=" +escape(value); } //error checking //var mac = getMacAddress(); var mac = "123"; setCookie('cookie_name',mac); window.location = "checkAvailability.php"; </script> checkAvailability.php $javascript_cookie_value = isset($_COOKIE["cookie_name"]) ? $_COOKIE["cookie_name"] : 1; mysql_query("INSERT INTO test (mac) VALUES ('$javascript_cookie_value')");

    Read the article

  • Select Top N Records Ordered by X, But Have Results in Reverse Order

    - by I. J. Kennedy
    I'm trying to get the top N records (when ordered by some column X), but have the result set in reverse order. The following statement is incorrect, but probably demonstrates what I'm after: SELECT * FROM (SELECT TOP 10 * FROM FooTable ORDER BY X DESC) ORDER BY X ASC For example, column X could be an ID or a timestamp; I want the latest 10 records but want them returned in forward chronological order.

    Read the article

  • Redis Cookbook Chat Recipe

    - by Tommy Kennedy
    I am a new starter to Node.Js and Redis. I got the Redis cookbook and was trying out the Chat client & Server recipe. I was wondering if anybody got the code to work or if there is some bug in the code. I dont see where the sent messages from the client get invoked on the server. Any help would be great. Regards, Tom Client Code: <?php ?> <html> <head> <title></title> <script src="http://192.168.0.118:8000/socket.io/socket.io.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script> var socket = io.connect('192.168.0.118',{port:8000}); socket.on('message', function(data){ alert(data); //var li = new Element('li').insert(data); //$('messages').insert({top: li}); }); </script> </head> <body> <ul id="messages"> <!-- chat messages go here --> </ul> <form id="chatform" action=""> <input id="chattext" type="text" value="" /> <input type="submit" value="Send" /> </form> <script> $('#chatform').submit(function() { socket.emit('message', 'test'); //$('chattext').val()); $('chattext').val(""); // cleanup the field return false; }); </script> </body> </html> Server Code: var http = require('http'); io = require('socket.io'); redis = require('redis'); rc = redis.createClient(); //rc1 = redis.createClient(); rc.on("connect",function(){ rc.subscribe("chat"); console.log("In Chat Stream"); }); rc.on("message",function (channel,message){ console.log("Sending hope: " + message); //rc1.publish("chat","hope"); socketio.sockets.emit('message',message); }); server = http.createServer(function(req,res){ res.writeHead(200,{'content-type':'text/html'}); res.end('<h1>hello world</h1>'); }); server.listen(8000); var socketio = io.listen(server);

    Read the article

  • How do I change a property's value based on a conditional in msbuild?

    - by Noel Kennedy
    I would like to change the value of a property if it is a certain value. In C# I would write: if(x=="NotAllowed") x="CorrectedValue; This is what I have so far, please don't laugh: <PropertyGroup> <BranchName>BranchNameNotSet</BranchName> </PropertyGroup> ///Other targets set BranchName <Target Name="CheckPropertiesHaveBeenSet"> <Error Condition="$(BranchName)==BranchNameNotSet" Text="Something has gone wrong.. branch name not entered"/> <When Condition="$(BranchName)==master"> <PropertyGroup> <BranchName>MasterBranch</BranchName> </PropertyGroup> </When> </Target>

    Read the article

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