Daily Archives

Articles indexed Monday October 21 2013

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

  • retrieve data based on date range using mysql ,php [on hold]

    - by preethi
    I am working on WPF where I have two datepickers when I try to retrieve the information on date range it displays only one record on all dates(same record displaying multiple times eg : date chosen from 01/10/2013 - 3/10/2013) where I have 3 different records on each day but my output is the first record displayed 3 times with same date and time. function cpWhitelistStats() { $startDate = $_POST['startDate']; $startDateTime = "$startDate 00:00:00"; $endDate = $_POST['endDate']; $endDateTime = "$endDate 23:59:59"; $cpId = $_POST['id']; $cpName = etCommonCpNameById($cpId); print "<h2 style=\"text-align: center;\">Permitted Vehicle Summary</h2>"; print "<h2 style=\"text-align: center;\">for $cpName</h2>"; $tmpDate = explode("/", $startDate); $startYear = $tmpDate[2]; $startMonth= $tmpDate[1]; $startDay = $tmpDate[0]; $tmpDate = explode("/", $endDate); $endYear = $tmpDate[2]; $endMonth= $tmpDate[1]; $endDay = $tmpDate[0]; $startDateTime = "$startYear-$startMonth-$startDay 00:00:00"; $endDateTime = "$endYear-$endMonth-$endDay 23:59:59"; $custId = $_SESSION['customerID']; $realCustomerId = $_SESSION['realCustomerId']; $maxVal = 0; if ($custId != "") { $conn = &newEtConn($custId); // Get the whitelist plates $staticWhitelistArray = etCommonMkWhitelist($conn, $cpId); array_shift($staticWhitelistArray); $startLoopDate = strtotime($startDateTime); $endLoopDate = strtotime($endDateTime); $oneDay = 60 * 60 * 24; // Get the entries $plateList = array_keys($staticWhitelistArray); $plate_lookup = implode('","', $plateList); $sql = "SELECT plate, entry_datetime, exit_datetime FROM stats WHERE plate IN (\"$plate_lookup\") AND entry_datetime > \"$startDateTime\" AND entry_datetime < \"$endDateTime\" AND carpark_id=\"$cpId\" "; $result = $conn->Execute($sql); if (!$result) { print $conn->ErrorMsg(); exit; } $rows = $result->fields; if ($rows != "") { unset($myArray); foreach($result as $values) { $plate = $values['plate']; $new_platelist[] = $plate; $inDateTime = $values['entry_datetime']; $outDateTime = $values['exit_datetime']; $tmp = explode(' ', $inDateTime); $inDate = $tmp[0]; $in_ts = strtotime($inDateTime); $out_ts = strtotime($outDateTime); $duration = $out_ts - $in_ts; $dur_array = intToDateArray($duration); $dur_string = ''; if ($dur_array['days'] > 0) { $dur_string .= $dur_array['days'] . ' days '; } if ($dur_array['hours'] > 0) { $dur_string .= $dur_array['hours'] . ' hours '; } if ($dur_array['mins'] > 0) { $dur_string .= $dur_array['mins'] . ' minutes '; } if ($dur_array['secs'] > 0) { $dur_string .= $dur_array['secs'] . ' secs '; } $myArray[$plate][] = array($inDateTime, $outDateTime, $inDate, $dur_string); } } while ($startLoopDate < $endLoopDate) { $dayString = strftime("%a, %d %B %Y", $startLoopDate); $dayCheck = strftime("%Y-%m-%d", $startLoopDate); print "<h2>$dayString</h2>"; print "<table width=\"100%\">"; print " <tr>"; print " <th>VRM</th>"; print " <th>Permit Group</th>"; print " <th>Entry Time</th>"; print " <th>Exit Time</th>"; print " <th>Duration</th>"; print " </tr>"; foreach($new_platelist as $wlPlate) { if ($myArray[$wlPlate][0][2] == $dayCheck) { print "<tr>"; print "<td>$wlPlate</td>"; if (isset($myArray[$wlPlate])) { print "<td>".$staticWhitelistArray[$wlPlate]['groupname']."</td>"; print "<td>".$myArray[$wlPlate][0][0]."</td>"; print "<td>".$myArray[$wlPlate][0][1]."</td>"; print "<td>".$myArray[$wlPlate][0][3]."</td>"; } else { print "<td>Vehicle Not Seen</td>"; print "<td>Vehicle Not Seen</td>"; print "<td>Vehicle Not Seen</td>"; } print "</tr>"; } } print "</table>"; $startLoopDate = $startLoopDate + $oneDay; } } }

    Read the article

  • Where must i focus [on hold]

    - by njnbat
    i have been working in technology field for last 7 years. i started with vb.net windows application along with oracle plsql. Later on i did projects that included coding in java ,struts framework ,javascripts. I have lost interest in doing projects with struts framework and doesn't find oracle plsql appealing too. I would love to work with new technologies especially mobile techs and my interests in coding persists still. But i am not sure if my organisation will ever shift its tech base to new and modern frameworks. Now i am 25 years old and worried about taking the right decision. i feel like quitting the job but at the same time i am concerned if i have the sufficient tech skills to start working on modern technologies in other organisations. Also i am confused if i must stick to the same company and wait for management jobs. Kindly suggest your opinions on the right strategy i must opt , being a 25 year old with this background.

    Read the article

  • Why do programming languages allow shadowing/hiding of variables and functions?

    - by Simon
    Many of the most popular programming languges (such as C++, Java, Python etc.) have the concept of hiding / shadowing of variables or functions. When I've encountered hiding or shadowing they have been the cause of hard to find bugs and I've never seen a case where I found it necessary to use these features of the languages. To me it would seem better to disallow hiding and shadowing. Does anybody know of a good use of these concepts?

    Read the article

  • Effective and simple matching for 2 unequal small-scale point sets

    - by Pavlo Dyban
    I need to match two sets of 3D points, however the number of points in each set can be different. It seems that most algorithms are designed to align images and trimmed to work with hundreds of thousands of points. My case are 50 to 150 points in each of the two sets. So far I have acquainted myself with Iterative Closest Point and Procrustes Matching algorithms. Implementing Procrustes algorithms seems like a total overkill for this small quantity. ICP has many implementations, but I haven't found any readily implemented version accounting for the so-called "outliers" - points without a matching pair. Besides the implementation expense, algorithms like Fractional and Sparse ICP use some statistics information to cancel points that are considered outliers. For series with 50 to 150 points statistic measures are often biased or statistic significance criteria are not met. I know of Assignment Problem in linear optimization, but it is not suitable for cases with unequal sets of points. Are there other, small-scale algorithms that solve the problem of matching 2 point sets? I am looking for algorithm names, scientific papers or C++ implementations. I need some hints to know where to start my search.

    Read the article

  • What is bootstrap listener in the context of Spring framework?

    - by jillionbug2fix
    I am studying Spring framework, in web.xml I added following which is a bootstrap listener. Can anyone give me a proper idea of what is a bootstrap listener? <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> You can see the doc here: ContextLoadListener Bootstrap listener to start up and shut down Spring's root WebApplicationContext. Simply delegates to ContextLoader as well as to ContextCleanupListener. This listener should be registered after Log4jConfigListener in web.xml, if the latter is used. As of Spring 3.1, ContextLoaderListener supports injecting the root web application context via the ContextLoaderListener(WebApplicationContext) constructor, allowing for programmatic configuration in Servlet 3.0+ environments. See WebApplicationInitializer for usage examples...

    Read the article

  • In an online questionnaire, what is a best way to design a database for keeping track of users all attempts?

    - by user1990525
    We have a web app where users can take online exams. Exam admin will create a questionnaire. A questionnaire can have many Questions. Each question is a multiple choice question (MCQ). Lets say an admin creates a questionnaire with 10 questions. Users attempt those questions. Now, unlike real exams users can attempt single questionnaire multiple times. And we have to keep track of his all attempts. e.g. User_id Questionnaire_id question_id answer attempt_date attempt_no 1 1 1 a 1 June 2013 1 1 1 2 b 1 June 2013 1 1 1 1 c 2 June 2013 2 1 1 2 d 2 June 2013 2 Now it can also happen that after user has attempted same questionnare twice, admin can delete a question from same questionnaire, but users attempt history should still have reference to that so that user can see his that question in his attempt history in spite of admin deleting that question. If user now attempts this changed questionnaire he should see only 1 question. User_id Questionnaire_id question_id answer attempt_date attempt_no 1 1 1 a 3 June 2013 3 Also, after this user modified some part of question, users attempt history should show question before modification while any new attempt should show modified question. How do we manage this at the database level? My first gut feeling was that, For deletes, do not do physical delete, just make a question inactive so that history can still keep track of users attempt. For modifications, create versions for questions and each new attempt refres to latest version of each question and history keeping reference to version of question at attempt time.

    Read the article

  • Launch Rhythmbox using a Keyboard shorcut

    - by palerdot
    I use Rhythmbox all the time in my Ubuntu. Is it possible to have a custom shortcut like Ctrl+R in Ubuntu, which can launch the Rhythmbox window, even if it is playing in the background ? Since, the emphasis of Linux OS flavors is to use keyboards as much as possible instead of mouse, i thought this functionality might tremendously help me in my Ubuntu environment. The Keyboard shortcuts sections asks for a command; So, I'm not able to figure out how to give a custom keyboard shortcut to a program like Rhythmbox. I'm using 12.04 if that helps. Thanks.

    Read the article

  • Xfce Power Manager on Xubuntu 13.10 doesn't work

    - by kirokko
    The problem is that its actually works, but something works with Xfce Power Manager at the same time. For example, I set that if I pressed Suspend button (on my Lenovo B560 its Fn+F2 hotkey) then system ask me what to do. But when Log out window appears, system goes to suspend. Another example is closing the lid. I set it to lock the screen via Xfce Power Manager, but system still goes to suspend. I thought that it might be laptop-mode-tools, but it's not installed. Before 13.10 I had 13.04 and everything were fine.

    Read the article

  • Screen has 1px vertical dead area on the right side

    - by pileofrocks
    Meaning that I can not click anything on that 1px vertical area (such as scrollbars). Illustration (purple = screen, black = the dead area): I am thinking Compiz has to be the main suspect, especially as on a guest account, this problem does not exist. I have a dual-monitor setup and this does not happen on the 2nd screen. However, turning off the 2nd display does not make any difference. I had this issue already before upgrading to 13.10 and while doing that, I also resetted all Compiz settings and re-loaded my profile configuration file. I have tried disabling all Compiz plugins under "Window Management" What next?

    Read the article

  • Wifi stops working in 13.10

    - by Vitor
    OK, my wifi is connecting fine, but it just stop downloading and uploading data. The skype stops, trying to reconnect, the firefox nighly and the google chromium stops loading pages and websites, everythings stops. But when I see the network icon: connected to my wifi. Then, I simply reconnect, or disconnect and connect again. Reconnecting, the wifi starts working again, the skype icon turns green, the browsers work again. Previously, I had 13.04 and never had this problem. When I upgraded to Ubuntu 13.10, the wifi started to do this. And the wifi has this problem since the early times of 13.10; since I installed 13.10, the wifi is having this issue (from the first day I installed it). Anyone having the same problem? Anyone knows how to fix it?

    Read the article

  • Ubuntu Touch Porting - Audio

    - by user205695
    I'm currenty trying to port Ubuntu Touch to the Galaxy s4 International LTE (GI9505/ jfltexx). I've come to the point where I need to create a UCM directory but I don't know where and how I should call it. By "looking at /usr/share/alsa/ucm/apq8064-tabla-snd-card/" is the local Ubuntu PC directory or a directory on the downloaded CM meant? Same thing for "/proc/asound/cards" which should give a hint about what the directory should be called. 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xfb200000 irq 51 1 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xfb080000 irq 17 I dont think the directory should be called anything like this. Thanks for the help Robin Kertels

    Read the article

  • Mouse pointer hides at bad times after updating to 13.10

    - by Richard
    A bug, I think, though I can't even seem to find any information when searching for it. The mouse pointer hides itself, but it is still possible to use it. Whenever I start watching a video in VLC, or start playing KSP through Steam my mouse pointer disappears. It is not returned upon exiting the application. I have not tried with other games in Steam. The mouse pointer do not disappear when watching videos online through YouTube, though it properly hides itself after a few seconds. The bug came about after I updated to 13.10, it was not present with the same setup in 13.04. I have tried removing ~/.compiz and restarting the kernel module psmouse. Going to tty1 and back to the desktop reveals the pointer, though this fix is bothering me. How do I fix this problem?

    Read the article

  • How do I disable a Nvidia 9600GT on MacBookPro 5.1?

    - by Gjan
    i finally put up a Dual Boot with Ubuntu and Lion on my old MacBookPro 5.1 As reported in many cases the discrete graphics card is turned on all the time consuming a lot of power and thus heating up the laptop. Since the discrete graphics card does not support the nvidia optimus technology, the corresponding packge nvidia-prime does not help in this case. Therefore my question is, how to manually disable the discrete graphics card Nvdidia 9600GT ? Preferably a 'switch-on-the-run' version, but a 'set-on-boot' would be totally fine!

    Read the article

  • install AMD Driver on HP Pavilion dv6-6051er on ubuntu 13.10 amd64

    - by user1685095
    So... I've tried to follow this instructions After running sudo dpkg -i fglrx*.deb I got a bunch of errors about missing packages, so I've star?d to install them one by one and stuck on this one. Unpacking fglrx-dev (from fglrx-dev_12.104-0ubuntu1_amd64.deb) ... dpkg: dependency problems prevent configuration of fglrx: fglrx depends on lib32gcc1; however: Package lib32gcc1 is not installed. fglrx depends on dkms; however: Package dkms is not installed. dpkg: error processing fglrx (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of fglrx-amdcccle: fglrx-amdcccle depends on fglrx; however: Package fglrx is not configured yet. dpkg: error processing fglrx-amdcccle (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of fglrx-dev: fglrx-dev depends on fglrx; however: Package fglrx is not configured yet. dpkg: error processing fglrx-dev (--install): dependency problems - leaving unconfigured Processing triggers for ureadahead ... ureadahead will be reprofiled on next reboot Errors were encountered while processing: fglrx fglrx-amdcccle fglrx-dev sudo apt-get install lib32gcc1 Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: fglrx : Depends: dkms but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). So, what sould I do next to install this drivers?

    Read the article

  • login problem for 13.10, my username does not appear

    - by Anand
    After upgrading my Ubuntu to the newest version 13.10, in the login interface, my account does not appear. I can login the guest session. There is also a remote login. I have no place to input my username to login my account. Does anyone have the same problem? ----EDIT---- Here is the file lightdm.conf [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu ----EDIT TWO--- Here is the official bug report: https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1235785

    Read the article

  • Google Sync brings back Login Keyring from previous distro: How to remove?

    - by Mridul Malpotra
    I previously had Ubuntu 12.04 and had my Login Keyring set to a password that I don't remember and am not able to guess. I changed my Linux version to Mint 15 Cinnamon recently, but everytime I sync my Google account with my browser, the Login Keyring keeps coming back. I tried the /Preferences/Password method but there is no file as such which is created. Also, .gnome2 folder doesn't have any keyring file. How can I make the box go away for all?

    Read the article

  • Samsung 305u notebook touchpad not working in Ubuntu 13.10

    - by Pablo Viollier
    I just installed Ubuntu 13.10 on my Samsung 305u notebook. The problem is that the touchpad (cursor and clicking) doesn't work, it does nothing. The only way to fix it is to plug an external mouse, which isn't the optimal. I already checked the system preferences and the touchpad is enabled. I used Ubuntu 13.04 before, and it worked. Then I installed Linux Mint and the touchpad stopped working, that's way I installed 13.10, but now it doesn't work here either. I hope someone can help me.

    Read the article

  • Saucy upgrade causes problem in Eclipse

    - by Ralph Rassweiler
    Does anybody has been through this: Using Ubuntu 13.10 (with JDK 1.7.0_45). Download and uncompress Eclipse Kepler for Java EE Developers. The software menus are messed up. Other softwares i didn't notice similar problem. When i click any menu of eclipse, the drop-down seems to be "cutted". Somethimes the drop-down shows, but the options are invisible. I try Eclipse Indigo, the same problem occurs.

    Read the article

  • VMWare Workstation 8 can't find the headers directory

    - by BackSlash
    I'm having an issue with VMware Workstation 8. I installed it but when i run it, it shows this window: But, when I press on "Browse", this window comes up Even if I select the linux-headers-3.8.0-31-generic folder, it says that it can't find the C headers for that kernel. Why? P.S. I already tried sudo apt-get install linux-headers-3.8.0-31-generic and the terminal says that the kernel is up to date.

    Read the article

  • Glue Records creation

    - by FFrewin
    I need some information on the following issue, as I would like to have it clear on my mind. I have a VPS server. All my sites hosted on this VPS are using as NameServer .gr domain, like ns1.greekdomain.gr & ns2.greekdomain.gr . The .gr domain name is a domain I own with a greek registar. Now, I want to move 2 websites with .co.uk domain names to my VPS. The co.uk domain names are registered with a UK based registar. When I went in the domain management panel, I did changed the nameservers of my domains to my ns.greekdomain.gr ns. However the panel returns an error about invalid nameservers. After digging, I found that my nameservers are not valid because they do not exist as records in the .co.uk registry. And here it starts my big trouble. The .co.uk registart tells me that I have to ask my hosting provider / .gr registar to create a new record to the .uk registry for my nameservers. The .gr registar tells me that my uk registar needs to create a new record for my ns. From Nominet (.co.uk) registry, the one employee tells me that I need to ask my uk registar, the other employee (seemed to not understand what I was asking) told me that they cannot change my nameservers for me, and she told me to contact anyone else (old hosting provider, uk registar, .gr registar) to help me with that. I can't find help from nobody. I try since the last week to transfer my websites to my VPS and I can't. So, the question is who is responsible and who is able to create glue records for my nameservers ?

    Read the article

  • AGLS Metadata - Is it widely adopted?

    - by Brandrally
    Recently, I have seen in a couple sites around Australia's meta data AGLS tags. <meta name="AGLS.Audience" scheme="agls-audience" content="All"/> <meta name="DC.Publisher" scheme="AglsAgent" content="Hyundai"/> I have never seen this kind of mark-up before and discovered: http://www.agls.gov.au/ Just wondering whether there is a big community / support out there for the adopting these tags? Any thoughts would be great.

    Read the article

  • Does Bing support anything like Google's First Click Free program?

    - by Dan Fabulich
    Google has a program for webmasters called First Click Free. To implement First Click Free, you need to allow all users who find a document on your site via Google search to see the full text of that document, even if they have not registered or subscribed to see that content. The user's first click to your content area is free. However, once that user clicks a link on the original page, you can require them to sign in or register to read further. The user must be able to see the full content of a multi-page article. You can allow this by displaying all content on a single page to both Googlebot and users. Alternatively, you can use cookies to make sure that a user can visit each page of a multi-page article before being asked for registration or payment. Does Bing support anything like this?

    Read the article

  • GLSL billboard move center of rotation

    - by Jacob Kofoed
    I have successfully set up a billboard shader that works, it can take in a quad and rotate it so it always points toward the screen. I am using this vertex-shader: void main(){ vec4 tmpPos = (MVP * bufferMatrix * vec4(0.0, 0.0, 0.0, 1.0)) + (MV * vec4( vertexPosition.x * 1.0 * bufferMatrix[0][0], vertexPosition.y * 1.0 * bufferMatrix[1][1], vertexPosition.z * 1.0 * bufferMatrix[2][2], 0.0) ); UV = UVOffset + vertexUV * UVScale; gl_Position = tmpPos; BufferMatrix is the model-matrix, it is an attribute to support Instance-drawing. The problem is best explained through pictures: This is the start position of the camera: And this is the position, looking in from 45 degree to the right: Obviously, as each character is it's own quad, the shader rotates each one around their own center towards the camera. What I in fact want is for them to rotate around a shared center, how would I do this? What I have been trying to do this far is: mat4 translation = mat4(1.0); translation = glm::translate(translation, vec3(pos)*1.f * 2.f); translation = glm::scale(translation, vec3(scale, 1.f)); translation = glm::translate(translation, vec3(anchorPoint - pos) / vec3(scale, 1.f)); Where the translation is the bufferMatrix sent to the shader. What I am trying to do is offset the center, but this might not be possible with a single matrix..? I am interested in a solution that doesn't require CPU calculations each frame, but rather set it up once and then let the shader do the billboard rotation. I realize there's many different solutions, like merging all the quads together, but I would first like to know if the approach with offsetting the center is possible. If it all seems a bit confusing, it's because I'm a little confused myself.

    Read the article

  • Using git (or any version control) regarding migration from one language to another [on hold]

    - by Max Benin
    I'm polishing an old project that i released some years ago, and the main purpose on that, is to arrange some folder structures and port the entire code from actionscript to haxe. All the game features, assets and design will remain the same. I have some doubts regarding versioning the project in this circumstance. Assuming that the only thing that will be drastically changed is the code migration, is it correct maintaining the new project changes on the same repository ? I was thinking in tagging it something like V1.1 or Branch the entire project. But i'm afraid that i'm gonna deviate from the versioning patterns. How can i use this version control issue in the best practice way ? Thanks.

    Read the article

  • Restrict Tile Map to its boundaries

    - by Farooq Arshed
    I have loaded a tmx file in cocos2dx and now I am trying to implement panning. I have successfully implemented the panning first part where the map moves. Now I want to restrict the map so it does not display the map beyond its boundary where it shows black screen. I am confused as to how to implement it. Below is my code any help would be appreciated. bool HelloWorld::init() { if ( !CCLayer::init() ) { return false; } const char* tmx= "isometric_grass_and_water.tmx"; _tileMap = new CCTMXTiledMap(); _tileMap->initWithTMXFile(tmx); this->addChild(_tileMap); this->setTouchEnabled(true); return true; } void HelloWorld::ccTouchesBegan(CCSet *touches, CCEvent *event){ CCSetIterator it; for (it=touches->begin(); it!=touches->end(); ++it){ CCTouch* touch = (CCTouch*)it.operator*(); CCLog("touches id: %d", touch->getID()); oldLoc = touch->getLocationInView(); oldLoc = CCDirector::sharedDirector()->convertToGL(oldLoc); } } void HelloWorld::ccTouchesMoved(CCSet *touches, CCEvent *event) { if (touches->count() == 1) { CCTouch* touch = (CCTouch*)( touches->anyObject() ); this->moveScreen(touch); } else if (touches->count() == 2) { this->scaleScreen(touches); } } void HelloWorld::moveScreen(CCTouch* touch) { CCPoint currentLoc = touch->getLocationInView(); currentLoc = CCDirector::sharedDirector()->convertToGL(currentLoc); CCPoint moveTo = ccpSub(oldLoc, currentLoc); moveTo = ccpMult(moveTo, -1); oldLoc = currentLoc; this->setPosition(ccpAdd(this->getPosition(), ccp(moveTo.x, moveTo.y))); }

    Read the article

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