Daily Archives

Articles indexed Friday July 6 2012

Page 11/16 | < Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • MySQL Workbench on Ubuntu 12.04 doesn't starts after latest (Jun12) updates

    - by Atul Kakrana
    MySQL workbench was working fine till today. I installed the regular updates and now its just doesnt starts. When started its just shows the 'opening screen' and nothing happens. I tried re-installing it from synaptic but no luck. I use it all the time and now suffering a lot. Any help will be appreciated. When run from terminal with: mysql-workbench --log-level=debug3 --verbose It gives a long log. Please see at: http://pastebin.com/Z2t8pdZF I see these error in the log but don't know what they mean and how it stopped working automatically, /home/atul/.mysql/workbench/wb_state.xml:1: parser error : Document is empty ^ /home/atul/.mysql/workbench/wb_state.xml:1: parser error : Start tag expected, '<' not found ^ /home/atul/.mysql/workbench/user_starters.xml:1: parser error : Document is empty ^ /home/atul/.mysql/workbench/user_starters.xml:1: parser error : Start tag expected, '<' not found ^ /home/atul/.mysql/workbench/starters_settings.xml:1: parser error : Document is empty ^ /home/atul/.mysql/workbench/starters_settings.xml:1: parser error : Start tag expected, '<' not found Atul

    Read the article

  • No upgrade option when booting from USB (12.04)

    - by Ramzi Njeim
    I am trying to upgrade my ubuntu 11.10, i know that it is better to upgrade using a live cd/usb, i booted from the live usb, followed the instructions as usual, but only found three options: Cleen install Install alongside your other operating systems Other The upgrade choice was missing. I even tried installing it after running ubuntu 12.04 from usb, and ended up with the same result. I have a dual boot Ubuntu 11.10 and Windows 7, i think it is only seeing the windows 7 and missing the ubuntu 11.10 partition. Any help ?

    Read the article

  • seo for complex url

    - by Mark
    I have a jobs website. There are categories and sub categories e.g the url for builders is www.mydomain.com/jobs/all/active/202/tradesmen/799/builders/county/all Because of the framework im using (Elgg), the "all" and "active" come after the plugin name. Also, i need to do a lot of things with the url: get the pplugin (job), get the correct type of entities (all and active), get the category (202 and tradesmen), get the subcategory (799 & builders) and get the location (county and all). Is this URL seo friendly or is it too messy? Is something like www.mydomain.com/jobs/tradesmen/builders/all better?

    Read the article

  • Link to pages on site without .html extension appearing in browser?

    - by Anime163
    I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example: www.mysite.com/document directs to www.mysite.com/document.html However, when I want to link to pages within my site using something like <a href="page.html"></a> I still get the .html appearing in the URL. So am I allowed to exclude the extension and leave a link as <a href="page"></a> so that the extension doesn't appear in the browser? Or is there a better way to do it?

    Read the article

  • Spam link text when searching for company directors' name

    - by Alex
    It was brought to my attention that if you search for the name of one of our directors (with the intent to find there profile page on our site) They come up as the first link in most search engines as you would expect but the link text is just pure spam. the three search string I have tested on Google, Bing, Ask, and Yahoo have all returned similar results. Here is a list of the search strings: Paolo rossi futex Mark rossi futex Marco rossi futex Dan Goldberg futex Any idea what might be causing this I have searched through as much of the sites code as I can and cant find anything wrong with it.

    Read the article

  • How to split a string with negative numbers using ActionScript 3.0

    - by inzombiak
    I'm having trouble loading my level. I'm using Ogmo to create my level then I import it. I have no problem converting 0's and 1's into an Array, but I can't figure out how to do the same for -1's. It separates the "-" and the "1". Any help would be great. I've posted my code and the XML files below levelXML = new XML(e.target.data); playerX = int(levelXML.Entities.Player.@x); playerY = int(levelXML.Entities.Player.@y); levelGrid = levelXML.Grid; levelGrid = levelGrid.split("\n").join(""); levelTiles = levelXML.Tiles; levelTiles = levelTiles.split("\n").join(""); levelTiles = levelTiles.split(",").join(""); tileArray = levelTiles.split(""); gridArray = levelGrid.split(""); for(i = 0; i <= 34; i++) { levelArray[i] = new Array(); for(j = 0; j <= 34; j++) { if(tileArray[j*35 + i] == 0) { gridArray[j*35+i] = -1; } var currentSymbol = gridArray[j*35+i]; levelArray[i][j] = currentSymbol; if(gridArray[j*35 + i] == 1) { wall = new Wall; addChild(wall); wall.x = i*20 + 10; wall.y = j*20 + 10; } else if(gridArray[j*35 + i] == -1) { pellet = new Pellet; addChild(pellet); pellet.x = i*20 + 10; pellet.y = j*20 + 10; } } } I know the code is very dirty, but I needed a quick fix. Grid exportMode="Bitstring" 11111111111111111111111111111111111 10000000000000000011000000000000001 10000000000000000011000000000000001 10011111001111110011001111110011001 10011111001111110011001111110011001 10011111001111110011001111110011001 10000000000000000000000000000000001 10000000000000000000000000000000001 10011111001100111111100110011111001 10011111001100000100000110011111001 10000000001100000100000110000000001 10000000001111100100111110000000001 11111111001111100100111110011111111 00000001001111100100111110010000000 00000001001100000000000110010000000 11111111001100000000000110011111111 00000000000000111111100000000000000 00000000000000100000100000000000000 11111111001100100000100110011111111 00000001001100111111100110010000000 00000001001100000000000110010000000 11111111001100111111100110011111111 10000000000000000100000000000000001 10000000000000000100000000000000001 10011111001111100100111110011111001 10000011000000000000000000011000001 10000011000000000000000000011000001 11110011001100111111100110011001111 11110011001100111111100110011001111 10000000001100000100000110000000001 10000000001100000100000110000000001 10011111111111100100111111111111001 10000000000000000000000000000000001 10000000000000000000000000000000001 11111111111111111111111111111111111 Tiles tileset="Tiles" exportMode="CSV"-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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S_VIOLATION"

    - by user1507827
    i want to make a console program to monitor a webpage's htmlsourcecode, because some of the page content are created by some javescript, so i have to use webbrowser control. like : View Generated Source (After AJAX/JavaScript) in C# my code is below: public class WebProcessor { public string GeneratedSource; public string URL ; public DateTime beginTime; public DateTime endTime; public object GetGeneratedHTML(object url) { URL = url.ToString(); try { Thread[] t = new Thread[10]; for (int i = 0; i < 10; i++) { t[i] = new Thread(new ThreadStart(WebBrowserThread)); t[i].SetApartmentState(ApartmentState.STA); t[i].Name = "Thread" + i.ToString(); t[i].Start(); //t[i].Join(); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return GeneratedSource; } private void WebBrowserThread() { WebBrowser wb = new WebBrowser(); wb.ScriptErrorsSuppressed = true; wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler( wb_DocumentCompleted); while(true ) { beginTime = DateTime.Now; wb.Navigate(URL); while (wb.ReadyState != WebBrowserReadyState.Complete) { Thread.Sleep(new Random().Next(10,100)); Application.DoEvents(); } } //wb.Dispose(); } private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WebBrowser wb = (WebBrowser)sender; if (wb.ReadyState == WebBrowserReadyState.Complete) { GeneratedSource= wb.Document.Body.InnerHtml; endTime = DateTime.Now; Console.WriteLine("WebBrowser " + (endTime-beginTime).Milliseconds + Thread.CurrentThread.Name + wb.Document.Title); } } } when it run, after a while (20-50 times), it throw the exception like this EXCEPTION code=ACCESS_VIOLATION (null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(nul l)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(n ull)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null) (null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(nul l)(null)BACKTRACE: 33 stack frames: #0 0x083dba8db0 at MatchExactGetIDsOfNames in mshtml.dll #1 0x0879f9b837 at StrongNameErrorInfo in mscorwks.dll #2 0x0879f9b8e3 at StrongNameErrorInfo in mscorwks.dll #3 0x0879f9b93a at StrongNameErrorInfo in mscorwks.dll #4 0x0879f9b9e0 at StrongNameErrorInfo in mscorwks.dll #5 0x0879f9b677 at StrongNameErrorInfo in mscorwks.dll #6 0x0879f9b785 at StrongNameErrorInfo in mscorwks.dll #7 0x0879f192a8 at InstallCustomModule in mscorwks.dll #8 0x0879f19444 at InstallCustomModule in mscorwks.dll #9 0x0879f194ab at InstallCustomModule in mscorwks.dll #10 0x0879fa6491 at StrongNameErrorInfo in mscorwks.dll #11 0x0879f44bcf at DllGetClassObjectInternal in mscorwks.dll #12 0x089bbafa at in #13 0x087b18cc10 at in System.Windows.Forms.ni.dll #14 0x087b91f4c1 at in System.Windows.Forms.ni.dll #15 0x08d00669 at in #16 0x08792d6e46 at in mscorlib.ni.dll #17 0x08792e02cf at in mscorlib.ni.dll #18 0x08792d6dc4 at in mscorlib.ni.dll #19 0x0879e71b4c at in mscorwks.dll #20 0x0879e896ce at in mscorwks.dll #21 0x0879e96ea9 at CoUninitializeEE in mscorwks.dll #22 0x0879e96edc at CoUninitializeEE in mscorwks.dll #23 0x0879e96efa at CoUninitializeEE in mscorwks.dll #24 0x0879f88357 at GetPrivateContextsPerfCounters in mscorwks.dll #25 0x0879e9cc8f at CoUninitializeEE in mscorwks.dll #26 0x0879e9cc2b at CoUninitializeEE in mscorwks.dll #27 0x0879e9cb51 at CoUninitializeEE in mscorwks.dll #28 0x0879e9ccdd at CoUninitializeEE in mscorwks.dll #29 0x0879f88128 at GetPrivateContextsPerfCounters in mscorwks.dll #30 0x0879f88202 at GetPrivateContextsPerfCounters in mscorwks.dll #31 0x0879f0e255 at InstallCustomModule in mscorwks.dll #32 0x087c80b729 at GetModuleFileNameA in KERNEL32.dll i have try lots of methods to solve the problem, finally, i found that if i thread sleep more millseconds, it will run for a longer time, but the exception is still throw. hope somebody give me the answer of how to slove ... thanks very much !!!

    Read the article

  • XSLT for-each from query results

    - by Ben Record
    I've been on a hunt for a while trying to find a solution to this but I cannot find anywhere that addresses this problem. I'm running a SQL query through XSLT which will return three rows. Here is the query: <query name="OrderedProductNames" rowElementName ="OrderedItem"> <sql> <![CDATA[ select OrderedProductName, Quantity from Orders_ShoppingCart where OrderNumber = 101689 // Hard coded order number for testing purposes. ]]> </sql> </query> Ideally, I would like to iterate through each row returned and do a choose when which is tested on a variable from the current row being inspected in the for-each loop, but I am not entirely sure thhis is possible. My secondary thought would be to use the for-each loop as a way to inject hidden HTML input elements with the values I would need, then I could write a javascript function to complete what I'm trying to do. Any suggestion on how I would go about completing either task would be greatly appreciated.

    Read the article

  • ExtJS (4.0) dynamic / lazy loading

    - by Paul
    Given a border layout with a west (navigation) and a center region. Let say I click on topic A in the west region, I want to replace (replace as in 'delete last topic') the center region with 'extjs' program code named topic_a.js I succeed in loading with this code: dynamicPanel = new Ext.Component({ loader: { url: '/www/file.htm', renderer: 'html', autoLoad: true, scripts: true } }); var oMainContainer = Ext.getCmp('maincontainer'); oMainContainer.show(); oMainContainer.add(dynamicPanel); But calling this the second time 'adds' things up in the center region and of course fails short in 'deleting', what would be a good approach?

    Read the article

  • Create a table of Quantiles in R for multiple Subsets of Data

    - by user1489719
    I'm trying to create append a table of quantiles in R for multiple subsets of data. Right now, I have a vector of ids (p_ids) in table DATA, which are not consecutive. For each value in p_ids, I am looking to list the quantile. So far, I've tried variations of: i <- 1 n <- 1 for (i in p_ids) { while(n <= nrow(data)) { quantiles[n] <- quantile(subset(alldata$variableA, alldata$variableB == i),probs = c(0,1,2,3)/3) n <- n + 1 } } I know my issue lies somewhere in the index, but I can't seem to get where the index should go. Suggestions?

    Read the article

  • Spring Web application internal visual monitoring heap space and permgen.

    - by Veniamin
    If I have created web application used Spring framework(based on maven), can I include some module/dependency/plugin into my app to monitor Heap space, Permgen, etc. It whould be greate to get some charts output likes as in VisuaVM. For example: http://localhost:8080/monitoring = Including something likes VisualVM I have found next dependency without link to repo: <dependency> <groupId>com.sun.tools.visualvm</groupId> <artifactId>core</artifactId> <version>1.3.3</version> </dependency> How to use it?

    Read the article

  • Jquery Mouseenter Click to Remove Class Not Working

    - by Sundance.101
    I'm really hoping someone can help. I have an unordered list of anchors that fades in opacity (the css defaults it to 0.7) on on mouseenter, and out again on mouseleave. On click, I want to add a class that makes the opacity stay at full. Got that far, but removing the class from the matched elements doesn't work at the moment - the other items that have had the class stay at full opacity, too. Here is the Jquery: $(document).ready(function(){ $("#nav a").mouseenter(function(){ $(this).fadeTo("slow",1); $("#nav a").click(function(){ $(".activeList").removeClass("activeList"); //THIS PART ISN'T WORKING $(this).addClass("activeList"); }); }); $("#nav a").mouseleave(function(){ if (!$(this).hasClass("activeList")) { $(this).fadeTo("fast",0.7); } }); }); I think it's because I'm stuck in the element because of mouseenter and can only affect (this). Have tried .bind/.unbind, have tried the add/remove class on it's own (it worked) and a few other things, but no luck so far! Any suggestions would be greatly appreciated.

    Read the article

  • Reverse proxy for a REST web service using ADFS/AD and WebApi

    - by Kai Friis
    I need to implement a reverse proxy for a REST webservice behind a firewall. The reverse proxy should authenticate against an enterprise ADFS 2.0 server, preferably using claims in .net 4.5. The clients will be a mix of iOS, Android and web. I’m completely new to this topic; I’ve tried to implement the service as a REST service using WebApi, WIF and the new Identity and Access control in VS 2012, with no luck. I have also tried to look into Brock Allen’s Thinktecture.IdentityModel.45, however then my head was spinning so I didn’t see the difference between it and Windows Identity Foundation with the Identity and Access control. So I think I need to step back and get some advice on how to do this. There are several ways to this, as far as I understand it. In hardware. Set up our Citrix Netscaler as a reverse proxy. I have no idea how to do that, however if it’s a good solution I can always hire someone who knows… Do it in the webserver, like IIS. I haven’t tried it; do not know if it will work. Create a web service to do it. 3.1 Implement it as a SOAP service using WCF. As I understand it ADFS do not support REST so I have to use SOAP. The problem is mobile device do not like SOAP, neither do I… However if it’s the best way, I have to do it. 3.2 Use Azure Access Control Service. It might work, however the timing is not good. Our enterprise is considering several cloud options, and us jumping on the azure wagon on our own might not be the smartest thing to do right now. However if it is the only options, we can do it. I just prefer not to use it right now. Right now I feel there are too many options, and I do not know which one will work. If someone can point me in the right directions, which path to pursue, I would be very grateful.

    Read the article

  • PHP: how to access variables inside a function that have been declared outside of it?

    - by Chris
    Please, I am very new and have not been confronted with OOP and all this related stuff, which I guess may be related to this issue (public, private, ...). So, any help and suggestions are very appreciated! :) At the very beginning of each page I include a file that starts the SESSION etc, lets call it session.php. In this file session.php, I include a file that contains a function, let's call it function1.php, because I need the function to be available in session.php. However, later in the main page I also include function2.php which needs to access variables set in session.php, so I additionally tried to include session.php in function2.php. The problem is that an error occurs as function1 will be declared multiple times... Fatal error: Cannot redeclare function1() (previously declared in ... So, what would be a more elegant and clean(er) solution for this? How could you solve it? Basically, I'd need to access variables inside a function that have been included in the main page before... Thank you very much in advance!

    Read the article

  • Entity Framework Create Database & Tables At Runtime

    - by dhsto
    I created some tables in an .edmx file and have been generating the database by selecting "Generate Database From Model" and manually executing an .edmx.sql file on the database to build the tables. Now, however, I am creating a setup dialog that allows the user to connect the program up to their own database. I thought running context.CreateDatabase would be good enough to create the database, along with the tables, but the tables are not created. What is the preferred method for creating the database and tables when the user specifies their own server and database to use, when originally starting with a model?

    Read the article

  • Null Pointer Exception

    - by user1507835
    I am getting a null pointer exception, but I dont know why. I checked to see if the cell was null before I read it to a string. So, why is that string null? private void fillArray() private void fillArray() { try { readBook = new HSSFWorkbook(readFile); } catch (IOException e) { System.out .println("If we know what we're doing, no one should ever see this line."); } if (readBook != null) {HSSFSheet infoSheet = readBook.getSheetAt(0); HSSFRow headingsRow = infoSheet.getRow(0); int i = 0; HSSFCell cell = headingsRow.getCell(i); String columnHeading = cell.toString(); while (cell != null && !(cell.toString().equals(""))) { cell = headingsRow.getCell(i); columnHeading = cell.toString(); columnHeadings.add(columnHeading); i++; } if(columnListIsSetup == false) { createList(); columnListIsSetup = true; } }

    Read the article

  • How are Wordpress plugins differentiated by Wordpress

    - by Ben Jackson
    I have created a wordpress plugin and uploaded it to my test site, but under Plugins wordpress informs me that there is update available to my plugin and it takes me to a completely separate plugin on wordpress.org Why is wordpress confusing them? How are plugins differentiated from each other as unique? Should I have a unique code or something? What is it in my plugin which is the same as the plugin Wordpress is confusing it with?

    Read the article

  • Stretch UL to fill the entire DIV

    - by Interfaith
    There is a similar post: Stretch horizontal ul to fit width of div But mine is a little bit tricky, as I have tried the above example but failed. My code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-… <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <script type='text/javascript' src='https://ajax.googleapis.com/ajax/li… <script> function mainmenu(){ $(" #nav ul ").css({display: "none"}); // Opera Fix $(" #nav li").hover(function(){ $(this).find('ul:first').css({visibi… "visible",display: "none"}).show(400); },function(){ $(this).find('ul:first').css({visibi… "hidden"}); }); } $(document).ready(function(){ mainmenu(); }); </script> <style> body{ font-size:0.85em; font-family:Verdana, Arial, Helvetica, sans-serif; } #nav, #nav ul{ margin:0; padding:0; list-style-type:none; list-style-position:outside; position:relative; line-height:1.5em; display: table; width: 100%; } #nav a{ display:block; padding:10px 15px 10px 15px; border:1px solid #fff; color:#fff; text-align: center; margin:0; text-decoration:none; background: #C34328; border-top:1px solid #EF593B; -moz-box-shadow:0px 3px 4px #591E12 inset; -webkit-box-shadow:0px 3px 4px #591E12 inset; -box-shadow:0px 3px 4px #591E12 inset; } #nav a:hover{ background-color:#fff; color:#333; } #nav li{ float:left; position:relative; } #nav ul { position:absolute; display:none; width:12em; top:3.2em; } #nav li ul a{ width:12em; height:auto; float:left; } #nav ul ul{ top:auto; } #nav li ul ul { left:12em; margin:0px 0 0 10px; } </style> </head> <body> <div style="width: 980px; border: 1px black solid;"> <ul id="nav"> <li><a href="#">Find a Doctor</a></li> <li><a href="#">Why Interfaith</a></li> <li><a href="#">For Patients & Visitors</a> <ul> <li><a href="#">3.1 jQuery</a></li> <li><a href="#">3.2 Mootools</a></li> <li><a href="#">3.3 Prototype</a></li> </ul> </li> <li><a href="#">Medical Services</a> <ul> <li><a href="#">Behavioral Health</a></li> <li><a href="#">Clinical Laboratory</a></li> <li><a href="#">Dentistry</a></li> <li><a href="#">Emergency</a></li> <li><a href="#">Gynecology</a></li> <li><a href="#">Medicine</a></li> <li><a href="#">Pastoral</a></li> <li><a href="#">Pediatrics</a></li> <li><a href="#">Physical Medicine & Rehab</a></li> </ul> </li> <li><a href="#">Medical Trainings</a> <ul> <li><a href="#">Medical Training</a></li> <li><a href="#">Behavioral Health</a></li> <li><a href="#">Predoctoral Externship</a></li> <li><a href="#">Podiatric Residency</a></li> <li><a href="#">Dental Residency</a></li> <li><a href="#">Pulmonary Medicine</a></li> </ul> </li> <li><a href="#">Contact</a></li> </ul> </div> </body> </html> Can someone tell me where I have to edit to complete the code? Thanks

    Read the article

  • jquery animate boxshadow

    - by mstef
    http://jsfiddle.net/mstefanko/w5aAn/877/ Below, i'm achieving the effect I wanted, but with a pending issue. Since i'm using a separate span and positioning it absolute over-top of a box with relative position. I can not access the inputs until after the animation is finished. I'm guessing the only way to alleviate this would be do something similar with just animating the border of the outer box? But nothing I was doing to animate box-shadow:inset was working. HTML <div id="wow"> <span id="pulse"></span> <input id="form-input"/> <input id="form-input"/> </div>? CSS #wow { width: 500px; height: 200px; display: inline-block; position: relative; border: 1px solid black; } #pulse { width: 100%; height: 100%; box-shadow:inset 0 0 20px #6c95c3; -moz-box-shadow:inset 0 0 10px #6c95c3; position: absolute; z-index: 20000; } JS $('#pulse').stop().animate({"opacity": 0}, "fast"); $('#pulse').effect("pulsate", { times:4 }, 500, function() { $(this).remove(); });

    Read the article

  • Uniquely identifying mobile devices over a network for webforms

    - by Eric
    I'm designing a system for mobile devices that can be assigned only to one job at a time. So I need to be able to know which mobile device is being used by accessing it's own unique static IP address or its device ID. I don't want to assign an ID myself for every machine that comes in which is why a static IP would work great. However, in trying to retrieve the client ip address I'm retrieving the wireless router's ip or some other ip which is not the mobile device's ip. I want to store that ip in a table and control which jobs are assigned to it. How can I accomplish this? I've tried the following but I'm getting the wireless ip: var hostEntry = Dns.GetHostEntry(Dns.GetHostName()); var ip = ( from addr in hostEntry.AddressList where addr.AddressFamily.ToString() == "InterNetwork" select addr.ToString() ).FirstOrDefault(); I'd rather not set a cookie if there exists a better alternative. TIA!

    Read the article

  • Set the output of a function equal to a variable

    - by ryno
    How would i set the output of a custom php function to a variable? The function is: function getRandomColor1() { global $cols; $num_cols = count($cols); $rand = array_rand($cols); $rand_col = $cols[$rand]; echo $rand_col; unset($cols[$rand]); } How would i set getRandomColor1 equal to $RandomColor1? I need it to be a variable so I can use it in css like: #boxone1 { height: 150px; width: 150px; background: <?=$RandomColor1?>; float: left; } If its not possible to set it as a variable, how else could i put the output of the function into css?

    Read the article

  • Publishing content to multiple (unknown) domains using Open Graph?

    - by Beau Lebens
    I'm working on an application that publishes content ('articles') on a variety of URLs, which are all controlled by the same WordPress installation (mapped domains, all powered by the same set of code/part of a network). All of the publishing is done through one central Facebook App. I have no idea what the domains for these URLS are going to be, since they are controlled by our users who register domains and then configure them within their account on our service. When I attempt to use Open Graph to publish content on one of these sites (that has a customized domain), they are rejected with the following error (error code 1611028): Object at URL * * * * of type 'article' is invalid because the domain '* * * ' is not allowed for the specified application id ' * * *'. You can verify your configured 'App Domain' at.... Since I can't enter all of the domains into Facebook, and since they are not derived from my App URL anyway, is there any way that I can have this work? Some sort of magic OG tag I can put in the pages or something? Or is it just not possible to do what I'm trying to do?

    Read the article

  • Error 404 after change filter in web.xml

    - by Falci
    I'm trying to add Spring Security to the project. After adding a block of code in web.xml, all url's give 404. What is wrong? It's a Maven project, Spring MVC, hibernate, postgres. (I do not know what information is relevant to describe the scenario) <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- The definition of the Root Spring Container shared by all Servlets and Filters --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/root-context.xml</param-value> </context-param> <!-- Creates the Spring Container shared by all Servlets and Filters --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- Processes application requests --> <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- After insert this block, all URL's return 404 error --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> UPDATE: Grave: Exception starting filter springSecurityFilterChain org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079) at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:217) at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:145) at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:179) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1366) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1454) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:295) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1379) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1537) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1547) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1526) at java.lang.Thread.run(Thread.java:722)

    Read the article

  • Android: onListItemClick not getting called in ListActivity

    - by user521469
    I'm having problems with my first Android app. I have subclassed ListActivity, and I'm having no luck getting the overridden onListItemClick() to respond to click events. I've read focus can be a problem, but changing focus in the XML files does not seem to work. Here's the relevant bits of code. Anyone see what's I've buggered up? public class Notepadv1 extends ListActivity { private int mNoteNumber = 1; private NotesDbAdapter mDbHelper; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.notepad_list); mDbHelper = new NotesDbAdapter(this); mDbHelper.open(); fillData(); } private void fillData() { // Get all of the notes from the database and create the item list Cursor c = mDbHelper.fetchAllNotes(); startManagingCursor(c); String[] from = new String[] { NotesDbAdapter.KEY_TITLE }; int[] to = new int[] { R.id.text1 }; SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row, c, from, to); setListAdapter(notes); } @Override public void onListItemClick (ListView l, View v, int position, long id){ super.onListItemClick(l, v, position, id); AlertDialog alert = new AlertDialog.Builder(this).create(); String message = "row clicked!"; alert.setMessage(message); alert.show(); } notepad_list.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ListView android:id="@android:id/list" android:layout_width="wrap_content" android:layout_height="wrap_content" android:dividerHeight="6dp"/> <TextView android:id="@android:id/empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/no_notes" /> </LinearLayout> And notes_row.xml <?xml version="1.0" encoding="utf-8"?> <TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="60dp" android:focusable="false"/>

    Read the article

  • design function: underlying structure to store list of results for print to file

    - by forest.peterson
    is this a good approach to print a list of items to csv file with a sublist attached to each item. The gist of the function is when an item is found that does not exactly macth then a list of close matches is generated - this works now writing out one list at a time to a command window. For export to a csv file I think all the lists must be generated, stored and then written at once. Right now I use a struct to store the attributes printed, each struct is an item on the list - these structs are then added to a sorted stack and when printed they pop off into write out. Is a stack of stacks of structs a good design?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >