Daily Archives

Articles indexed Wednesday September 12 2012

Page 3/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How does the HUD prioritize commands?

    - by user50849
    Every now and then I want to reach the "Edit Preferences" menu item in Firefox, and the HUD makes this very convenient. ALT + "Edi" will suggest exactly that to me. Something that I find annoying however is that if I complete the work "Edit" instead, the HUD will switch to suggest "Network Edit preferences" instead. While this is a perfectly valid match as well, it seems like an inconsistent behaviour to me. Could someone explain in more detail how the matching works, so that I can make better use of the HUD?

    Read the article

  • Is there a Source Insight alternative?

    - by hansioux
    I am not a developer, but for my work I trace a lot of codes. It is actually rather difficult reading other people's code, especially for bigger projects. Source Insight is a great application that stores all the symbols in a data base, so you can see a new function being called, click on it and see how the function is written. You can see all the referrer of a object or jump to a caller. You don't need to break the train of thought and think up shell commands just to find these things every time you ran into a new variable/structure/function from some other files. I have it running on WINE, but there are little glitches that sometimes gets in the way. I know people will mention C-scope, I've tried it, but it really isn't the same. So, with so many huge open source projects out there for Ubuntu, are there native tools to help read them efficiently? EDIT: Thanks for the suggestions, but does CODE::BLOCKS or CodeLite provide abilities to see the function that the mouse clicked on without jumping to it, so I can see the caller and callee at the same time?

    Read the article

  • Download a file over an active SSH session

    - by Oli
    So I'm SSHed into my Ubuntu server from my Ubuntu desktop. I'm at a certain path and I want to download a file to my local filesystem (preferably the path I was at before I entered the SSH session). I could mount SSH and pull the file across by mouse but what if I was trying to get a root file and logging in by root directly is disallowed? Even if that wasn't the case (it isn't now), surely there must be a simple way of pulling back a file over an active SSH connection. Surely!

    Read the article

  • How to calculate maximum number of request in 128 MB VPS performance?

    - by ifdion
    I am a newbie here, please let me know if I'm using wrong webmaster terms. I am currently setting up a VPS for a multi site WordPress. The VPS uses Debian 6 LNMP setup and the DNS is being taken care by another service. Currently the VPS is running non multi site WordPress with -+ 83 MB RAM out of 128MB. As far as I know the performance is relative to the number of request, not the number of sites in the multi site setup. The question How do I calculate maximum number of request in with that setup? If the information is not enough, what other factor do I need to know? Thank you in advance.

    Read the article

  • Shopping Cart URL Structure

    - by Drew
    In regards to URL structure when it comes to guests and authenticated users, am I able to track traffic associated with both paths, but at the same time track total conversions going through the shopping cart? I have set up the following URL structure: Authenticated users follow this path: /cart /checkout /checkout-confirmation-ty Guests go like such: /cart /checkout-guest /checkout-confirmation-guest-ty can I track the authenticated and guest users separately? is this possible with Google Analytics?

    Read the article

  • Are generic keywords in url bad for SEO? [closed]

    - by user1661479
    Possible Duplicate: Squeezing all the SEO out of a URL as possible Need help with url structure. Let's say I'm a manufacturer of Wire EDM machines. Is it bad for me to put the keywords wire-edm in my url to help try to raise SEO ranking? For example: mywebsite.com/wire-edm/machine/model-xxxx mywebsite.com/wire-edm/customer-service mywebsite.com/wire-edm/contact Or should I leave it as the following because the gains are fairly insignificant and it doesn't help users understand my site structure: mywebsite.com/machine/model-xxxx mywebsite.com/customer-service mywebsite.com/contact I’d like to hear what everyones thoughts are on this and please provide some sources for which method is better.

    Read the article

  • Apache2 Unwantingly Allowing Proxy Requests

    - by Kevin
    I'm not sure if this is the right location, but this is fairly urgent. I have completely removed all traces of mod_proxy and the other mod_proxy mods, although the Apache server continues to allow proxy requests. I have restarted numerous times, and have shut down until I can find an answer. I've noticed lots of requests from IPs in and around China to external sites such as free movie downloads and such. I'd like to prevent this from happening. I'll be grateful for any help I get.

    Read the article

  • GLSL Bokeh using Quads and Textures

    - by Notoriousaur
    I'm trying to create a depth of field effect with bokeh sprites in GLSL. Specifically, what i would like to do is, for each pixel: See if the pixel is out of the focal range If it is, draw a quad and apply a texture to provide a bokeh sprite. This kind of implementation is seen in the Unreal Engine and by Matt Pettineo, however, both implementations are in DX11 and I'm using OpenGL. I'm a bit stuck on the drawing a quad and applying a texture bit. Does anyone know how I can do this, or provide any relevant links as to how I can do this? Thanks

    Read the article

  • Speed, delta time and movement

    - by munchor
    player.vx = scroll_speed * dt /* Update positions */ player.x += player.vx player.y += player.vy I have a delta time in miliseconds, and I was wondering how I can use it properly. I tried the above, but that makes the player go fast when the computer is fast, and the player go slow when the computer is slow. The same thing happens with jumping. The player can jump really high when the computer is faster. This is sort of unfair, I think, because. Should I be doing this someway else? Thanks.

    Read the article

  • Player position triggering teleports

    - by jSherz
    I'm developing a Minecraft plugin (bukkit) in which a server admin can create 'portals' - a small region that will teleport any players who enter it. I have the teleportation sorted and I know how I could define areas that the player's position could be tested against. This would involve an ArrayList containing the zones and then hooking the PlayerMoveEvent so that the ArrayList is searched each time for a matching portal region. Although this method would work, I doubt that it would be very efficient when 100+ players are all moving around at the same time. Is there a better way of checking a player position against a set of 'zones' / regions?

    Read the article

  • How can I edit an entity in MVC4 with EF5 which has a unique constraint?

    - by Yoeri
    [HttpPost] public ActionResult Edit(Car car) { if (ModelState.IsValid) { db.Entry(car).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(car); } This is a controller method scaffolded by MCV 4 My "car" entity has a unique field: LicensePlate. I have custom validation on my Entity: Validation: public partial class Car { partial void ValidateObject(ref List<ValidationResult> validationResults) { using (var db = new GarageIncEntities()) { if (db.Cars.Any(c => c.LicensePlate.Equals(this.LicensePlate))) { validationResults.Add( new ValidationResult("This licenseplate already exists.", new string[]{"LicensePlate"})); } } } } should it be usefull, my car entity: public partial class Car:IValidatableObject { public int Id { get; set; } public string Color { get; set; } public int Weight { get; set; } public decimal Price { get; set; } public string LicensePlate { get; set; } public System.DateTime DateOfSale { get; set; } public int Type_Id { get; set; } public int Fuel_Id { get; set; } public virtual CarType Type { get; set; } public virtual Fuel Fuel { get; set; } public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) { var result = new List<ValidationResult>(); ValidateObject(ref result); return result; } partial void ValidateObject(ref List<ValidationResult> validationResults); } QUESTION: Everytime I edit a car, it raises an error: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. The error is the one raised by my validation, saying it can't edit because there is already a car with that license plate. If anyone could point me in the right direction to fix this, that would be great! I searched but couldn't find anything, so even related posts are welcome!

    Read the article

  • JQuery not working in IE7/8

    - by user1665283
    I have been given the following code to implement: <script type="text/javascript"> $(document).ready(function(){ $('.hotspots a').bind('mouseover click', function() { $this = $(this); if($('.hotspot-target').data('hotspot')!=$this.attr('href')) { $('.hotspot-target').data('hotspot', $this.attr('href')); $('.hotspot-target').fadeOut(100, function() { $('.hotspot-target').css({backgroundImage: 'url('+$this.attr('href')+')'}); $('.hotspot-target .detail').hide(); $('.hotspot-target .detail.'+$this.attr('class')).show(); $('.hotspot-target').fadeIn(100); }); } return false; }) }); </script> It works fine in FF and Chrome with no errors in the console. I also can't see any errors in the IE debugger, though I'm not so used to how that works. Is there anything obviously wrong with the above code? It's placed at the end of the page

    Read the article

  • Twisted Spread: How to authenticate each RPC with digital signature

    - by kronat
    I have remote objects which talk each others with RPCs, using Twisted Spread. I want that objects authenticate messages, before using them, with digital signatures, but I don't know where to start to implement this. In my head, the Root object must have a public/private key pair, and the Client too. When a message is sent, a digital signature of the hash is added, and when it is received, the signature is checked. Is the Protocol part where I need to add these adds and checks? Thank you

    Read the article

  • Restrict dates in 'datetimepicker' in C#

    - by Jordan-C
    A feature of a forms based application I am developing allows the user to search through a history of records. The user can search by name, by number, and between dates, and populate the results in a datagridview control. However, as the form will be used to search for previous records. The ability for the user to select future dates is not required. Is there a way to prevent the user from selecting future dates, or even grey the future dates out?

    Read the article

  • Getting "invalid XML in the response" while checking out my project from github

    - by Shusl
    I was trying to get fresh copy of my project from github using tortoise svn client. But I am getting following exception. The PROPFIND request returned invalid XML in the response: XML parse error at line 1: no element found (Checkout from https://github.com/anoopchaurasia/JavaScript-File-Manager.git) When I tried to checkout using subeclipse on Eclipse, it saying "Folder does not exist.". I am able to checkout same repository on my other system.

    Read the article

  • Groovy & Grails Concurrency ( quartz, executor )

    - by Pietro
    What I'm trying to do is to run multiple threads at some starting time. Those threads must stay alive for 90minutes after start. During the 90minutes they execute something after a random sleep time (ex: 5minutes to 15minutes). Here is a pseudo code on how I would implement it. The problem is that doing it in this way the threads run in an unexpected way. How can I implement correctly something like this? Class MyJob { static triggers = { cron name: 'first', cronExpression: "0 30 21 * * FRI" cron name: 'second', cronExpression: "0 30 19 * * FRI" cron name: 'third', cronExpression: "0 30 17 * * FRI" def myService def execute() { switch( between trigger name ) case 'first': model = Model.findByAttribute(...) ... myService.run( model, start_time ) break; ... } } class MyService { def run( model, start_time ) { def end_time = end_time.plusMinutes(90) model.fields.each( field -> Thread.start { executeSomeTasks( field, start_time, end_time ) } ) } def executeSomeTasks( field, start_time, end_time ) { while( start_time < end_time ) { ...do something ... sleep( Random.nextInt( 1000 ) ); } } }

    Read the article

  • how to use use case relations - uml

    - by joao alves
    Heys guys! Im have been study UML and im trying to to design the use case diagram of a problem. Lets supose my app consists in this: Two Requesites: - create teams - create players This is the deal: A user can create a team, and after create a team he can create players for that team(not required). But in this app there are multiple users, and a user can create a team and other user can create players. The only constraint is that to create players must exist alreay a team. I research and i end up a little confuse. If i get the concepts of relations on use case diagrams right, i think i should have the folowwing two use cases: [use case - create team] <-------extends---- [use case - create player] I need opinions,Is this the proper solution? or should i have two not related use cases? Thanks in advance, and im sorry my english.

    Read the article

  • Extending ClaimsIdentity in MVC3

    - by Steoates
    I've got my claims set-up with MVC3 using azure and everything is going well. What I need to do now is extend the Claims Identity that's in the current thread / http context and add my own information (DOB, Address.. that sort of stuff) so my question is - where is the best place to do this? any examples would be great.. I presume that when the user is authenticated id then have to go to the DB and pull back the relevant record for the user then add it to the custom Claims Identity object? cheers. ste.

    Read the article

  • GROUP BY on multiple columns

    - by Tams
    I have a table that looks like the following - Id Reference DateAttribute1 DateAttribute2 1 MMM005 2011-09-11 2012-09-10 2 MMM005 2012-06-13 2012-09-10 3 MMM006 2012-08-22 2012-09-10 4 MMM006 2012-08-22 2012-09-11 I have handle to the id values. I would like to query such that I get the following result Id Reference DateAttribute1 DateAttribute2 2 MMM005 2012-06-13 2012-09-10 4 MMM006 2012-08-22 2012-09-11 I would like my result to be grouped by reference and then 'DateAttribute1' and then 'DateAttribute2' as such - DateAttribute1 has a priority over DateAttribute2 as you can see above in the result. How should I write my query to fetch the results in the above manner? Any solution?

    Read the article

  • Can we run windowservice or EXE in Azure website or in Virtual Machine?

    - by Arun Rana
    I have experienced with cloud service/hosted service on Azure. However regarding another project i am confused in selection in terms of functionalities. I have project (2 tier asp.net app) with that i need to run windowservice or exe which will do some functionality every day (like fetch data) so my confusions are as below Regarding Azure website Can i access RDP if i'll move to reserved instance? can i run windowservice/exe ? Regarding Virtual Machine Is it same as dedicated server? can i use WASD as database from application reside in same? I think i can run any exe and installed anything however azure is going to recycle this and if yes then what happened on recycling? can i use new window server 2012 (VHD) in that? Azure website & VM both are in preview mode so is it reliable to use it as production version?

    Read the article

  • Symfony2 Syntax Errors (in vendor files)

    - by user1665246
    To maintain code integrity across our servers we'd like to keep the /vendor/* directory under source control, rather than use composer to download files each time we roll out onto another server - i.e. we can be certain that the /vendor/* files are identical. We run a syntax checker against all files committed to source control and run across the following error: File '/vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle/Bundle.php' failed the PHP syntax check with the following error: PHP Parse error: syntax error, unexpected '}', expecting T_NS_SEPARATOR in /vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle/Bundle.php on line 3 Is the "error" in this file intentional ? Any help appreciated. File contents below: <?php namespace {{ namespace }}; use Symfony\Component\HttpKernel\Bundle\Bundle; class {{ bundle }} extends Bundle { }

    Read the article

  • ssrs 2008 programmatically add tables rows

    - by davethecoder
    Above is how my report looks, the part in yellow in hidden, and is only shown when the user clicks the + icon on the [name]. the result is basically the percentage difference from the Past [X] - [TERM] i.e there is a dropdown with, [weeks, months, days, hours] and a textbox of qty. so choosing qty = 4 and term = weeks will delivery a result set spread over 4 weeks based on the parent result sets date range and name ID I wish to populate here the number of rows, dependant on the value set by the user and the data will be from a dataset. Is it possible to dynamically add more sub rows ( like on row data bound ) if my first row is ID 123 [name], is it possible to send this value [123] to a dataset in order that all subrows are only relevant to the name with ID of 123? this is my first bash at SSRS so please no half cut answers, that just lead to more questions about the answer given :-) if this makes sense. Thanks

    Read the article

  • I need to do a BASICE For Loop algorithm for a java Pyramid

    - by user1665119
    Question 2. USE THE FOR LOOP. Design and write an algorithm that will read a single positive number from the keyboard and will then print a pyramid out on the screen. The pyramid will need to be of a height equal in lines to the number inputted by the operator. Your program is not to test for negative numbers, nor is it to cater for them. For your test, use the number 7. If you would like to take the problem further, try 18 and watch what happens. Example input: 4 Example output: 1 121 12321 1234321

    Read the article

  • Correlate GROUP BY and LEFT JOIN on multiple criteria to show latest record?

    - by Sunbird
    In a simple stock management database, quantity of new stock is added and shipped until quantity reaches zero. Each stock movement is assigned a reference, only the latest reference is used. In the example provided, the latest references are never shown, the stock ID's 1,4 should have references charlie, foxtrot respectively, but instead show alpha, delta. How can a GROUP BY and LEFT JOIN on multiple criteria be correlated to show the latest record? http://sqlfiddle.com/#!2/6bf37/107 CREATE TABLE stock ( id tinyint PRIMARY KEY, quantity int, parent_id tinyint ); CREATE TABLE stock_reference ( id tinyint PRIMARY KEY, stock_id tinyint, stock_reference_type_id tinyint, reference varchar(50) ); CREATE TABLE stock_reference_type ( id tinyint PRIMARY KEY, name varchar(50) ); INSERT INTO stock VALUES (1, 10, 1), (2, -5, 1), (3, -5, 1), (4, 20, 4), (5, -10, 4), (6, -5, 4); INSERT INTO stock_reference VALUES (1, 1, 1, 'Alpha'), (2, 2, 1, 'Beta'), (3, 3, 1, 'Charlie'), (4, 4, 1, 'Delta'), (5, 5, 1, 'Echo'), (6, 6, 1, 'Foxtrot'); INSERT INTO stock_reference_type VALUES (1, 'Customer Reference'); SELECT stock.id, SUM(stock.quantity) as quantity, customer.reference FROM stock LEFT JOIN stock_reference AS customer ON stock.id = customer.stock_id AND stock_reference_type_id = 1 GROUP BY stock.parent_id

    Read the article

  • Sending email to gmail account using c++ on windows error check

    - by LCD Fire
    I know this has been disscused a lot, but I I'm not asking how to do it, I'm just asking why it doesn't work. What I am doing wrong. It says that the email was sent succesfully but I don't see it in my inbox. I want to send an email to a gmail account, not through it. #include <iostream> #include <windows.h> #include <fstream> #include <conio.h> #pragma comment(lib, "ws2_32.lib") // Insist on at least Winsock v1.1 const int VERSION_MAJOR = 1; const int VERSION_MINOR = 1; #define CRLF "\r\n" // carriage-return/line feed pair using namespace std; // Basic error checking for send() and recv() functions void Check(int iStatus, char *szFunction) { if((iStatus != SOCKET_ERROR) && (iStatus)) return; cerr<< "Error during call to " << szFunction << ": " << iStatus << " - " << GetLastError() << endl; } int main(int argc, char *argv[]) { int iProtocolPort = 25; char szSmtpServerName[64] = ""; char szToAddr[64] = ""; char szFromAddr[64] = ""; char szBuffer[4096] = ""; char szLine[255] = ""; char szMsgLine[255] = ""; SOCKET hServer; WSADATA WSData; LPHOSTENT lpHostEntry; LPSERVENT lpServEntry; SOCKADDR_IN SockAddr; // Check for four command-line args //if(argc != 5) // ShowUsage(); // Load command-line args lstrcpy(szSmtpServerName, "smtp.gmail.com"); lstrcpy(szToAddr, "[email protected]"); lstrcpy(szFromAddr, "[email protected]"); // Create input stream for reading email message file ifstream MsgFile("D:\\d.txt"); // Attempt to intialize WinSock (1.1 or later) if(WSAStartup(MAKEWORD(VERSION_MAJOR, VERSION_MINOR), &WSData)) { cout << "Cannot find Winsock v" << VERSION_MAJOR << "." << VERSION_MINOR << " or later!" << endl; return 1; } // Lookup email server's IP address. lpHostEntry = gethostbyname(szSmtpServerName); if(!lpHostEntry) { cout << "Cannot find SMTP mail server " << szSmtpServerName << endl; return 1; } // Create a TCP/IP socket, no specific protocol hServer = socket(PF_INET, SOCK_STREAM, 0); if(hServer == INVALID_SOCKET) { cout << "Cannot open mail server socket" << endl; return 1; } // Get the mail service port lpServEntry = getservbyname("mail", 0); // Use the SMTP default port if no other port is specified if(!lpServEntry) iProtocolPort = htons(IPPORT_SMTP); else iProtocolPort = lpServEntry->s_port; // Setup a Socket Address structure SockAddr.sin_family = AF_INET; SockAddr.sin_port = iProtocolPort; SockAddr.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list); // Connect the Socket if(connect(hServer, (PSOCKADDR) &SockAddr, sizeof(SockAddr))) { cout << "Error connecting to Server socket" << endl; return 1; } // Receive initial response from SMTP server Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() Reply"); // Send HELO server.com sprintf(szMsgLine, "HELO %s%s", szSmtpServerName, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() HELO"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() HELO"); // Send MAIL FROM: <[email protected]> sprintf(szMsgLine, "MAIL FROM:<%s>%s", szFromAddr, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() MAIL FROM"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() MAIL FROM"); // Send RCPT TO: <[email protected]> sprintf(szMsgLine, "RCPT TO:<%s>%s", szToAddr, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() RCPT TO"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() RCPT TO"); // Send DATA sprintf(szMsgLine, "DATA%s", CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() DATA"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() DATA"); //strat writing about the subject, end it with two CRLF chars and after that you can //write data to the body oif the message sprintf(szMsgLine, "Subject: My own subject %s%s", CRLF, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() DATA"); // Send all lines of message body (using supplied text file) MsgFile.getline(szLine, sizeof(szLine)); // Get first line do // for each line of message text... { sprintf(szMsgLine, "%s%s", szLine, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() message-line"); MsgFile.getline(szLine, sizeof(szLine)); // get next line. } while(!MsgFile.eof()); // Send blank line and a period sprintf(szMsgLine, "%s.%s", CRLF, CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() end-message"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() end-message"); // Send QUIT sprintf(szMsgLine, "QUIT%s", CRLF); Check(send(hServer, szMsgLine, strlen(szMsgLine), 0), "send() QUIT"); Check(recv(hServer, szBuffer, sizeof(szBuffer), 0), "recv() QUIT"); // Report message has been sent cout<< "Sent " << argv[4] << " as email message to " << szToAddr << endl; // Close server socket and prepare to exit. closesocket(hServer); WSACleanup(); _getch(); return 0; }

    Read the article

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