Search Results

Search found 184 results on 8 pages for 'axel myers'.

Page 7/8 | < Previous Page | 3 4 5 6 7 8  | Next Page >

  • MySQL: What's the best to use, Unix TimeStamp Or DATETIME

    - by Axel
    Hello, Probably many coders want to ask this question. it is What's the adventages of each one of those MySQL time formats. and which one you will prefer to use it in your apps. For me i use Unix timestamp because maybe i find it easy to convert & order records with it, and also because i never tried the DATETIME thing. but anyways i'm ready to change my mind if anyone tells me i'm wrong. Thanks

    Read the article

  • How can I simplify this redundant code?

    - by Alix Axel
    Can someone please help me simpling this redundant piece of code? if (isset($to) === true) { if (is_string($to) === true) { $to = explode(',', $to); } $to = array_filter(filter_var_array(preg_replace('~[<>]|%0[ab]|[[:cntrl:]]~i', '', $to), FILTER_VALIDATE_EMAIL)); } if (isset($cc) === true) { if (is_string($cc) === true) { $cc = explode(',', $cc); } $cc = array_filter(filter_var_array(preg_replace('~[<>]|%0[ab]|[[:cntrl:]]~i', '', $cc), FILTER_VALIDATE_EMAIL)); } if (isset($bcc) === true) { if (is_string($bcc) === true) { $bcc = explode(',', $bcc); } $bcc = array_filter(filter_var_array(preg_replace('~[<>]|%0[ab]|[[:cntrl:]]~i', '', $bcc), FILTER_VALIDATE_EMAIL)); } if (isset($from) === true) { if (is_string($from) === true) { $from = explode(',', $from); } $from = array_filter(filter_var_array(preg_replace('~[<>]|%0[ab]|[[:cntrl:]]~i', '', $from), FILTER_VALIDATE_EMAIL)); } I tried using variable variables but without success (it's been a long time since I've used them).

    Read the article

  • SQLite - ON DUPLICATE KEY UPDATE

    - by Alix Axel
    MySQL has something like this: INSERT INTO visits (ip, hits) VALUES ('127.0.0.1', 1) ON DUPLICATE KEY UPDATE hits = hits + 1; As far as I'm know this feature doesn't exist in SQLite, what I want to know is if there is any way to archive the same effect without having to execute two queries. Also, if this is not possible, what do you prefer: SELECT + (INSERT or UPDATE) or UPDATE (+ INSERT if UPDATE fails)

    Read the article

  • UCA + Natural Sorting

    - by Alix Axel
    I recently learnt that PHP already supports the Unicode Collation Algorithm via the intl extension: $array = array ( 'al', 'be', 'Alpha', 'Beta', 'Álpha', 'Àlpha', 'Älpha', '????', 'img10.png', 'img12.png', 'img1.png', 'img2.png', ); if (extension_loaded('intl') === true) { collator_asort(collator_create('root'), $array); } Array ( [0] => al [2] => Alpha [4] => Álpha [5] => Àlpha [6] => Älpha [1] => be [3] => Beta [11] => img1.png [9] => img10.png [8] => img12.png [10] => img2.png [7] => ???? ) As you can see this seems to work perfectly, even with mixed case strings! The only drawback I've encountered so far is that there is no support for natural sorting and I'm wondering what would be the best way to work around that, so that I can merge the best of the two worlds. I've tried to specify the Collator::SORT_NUMERIC sort flag but the result is way messier: collator_asort(collator_create('root'), $array, Collator::SORT_NUMERIC); Array ( [8] => img12.png [7] => ???? [9] => img10.png [10] => img2.png [11] => img1.png [6] => Älpha [5] => Àlpha [1] => be [2] => Alpha [3] => Beta [4] => Álpha [0] => al ) However, if I run the same test with only the img*.png values I get the ideal output: Array ( [3] => img1.png [2] => img2.png [1] => img10.png [0] => img12.png ) Can anyone think of a way to preserve the Unicode sorting while adding natural sorting capabilities?

    Read the article

  • What is the best VCS Solution for Windows?

    - by Alix Axel
    My code base is getting quite big and it's difficult to organize all the different branches using just directories, I was wondering what would be a decent version control system for my own personal use that works (with little hassle) on Windows? PS: I'm not looking for hosted VCS like GitHub, SourceForge or Google Code.

    Read the article

  • Flash: Loadmovie() in a specific width and height ?

    - by Axel
    Hi, i'm using loadmovie() to load a youtube video player inside my flash website but i want to specify the width and height so it can fit my box. This is my code: vloader.loadMovie("http://www.youtube.com/v/Alw5hs0chj0&hl=fr&fs=1hJ-mPcGtC"); I have an empty CLIP called "vloader" where i load the video player. Note: it is recommended that i get a code in Action script 1.0 Thanks

    Read the article

  • Pure functional bottom up tree algorithm

    - by Axel Gneiting
    Say I wanted to write an algorithm working on an immutable tree data structure that has a list of leaves as its input. It needs to return a new tree with changes made to the old tree going upwards from those leaves. My problem is that there seems to be no way to do this purely functional without reconstructing the entire tree checking at leaves if they are in the list, because you always need to return a complete new tree as the result of an operation and you can't mutate the existing tree. Is this a basic problem in functional programming that only can be avoided by using a better suited algorithm or am I missing something?

    Read the article

  • How to loop an array with strings as indexes in PHP

    - by Axel Lambregts
    I had to make an array with as indexes A-Z (the alphabet). Each index had to have a value 0. So i made this array: $alfabet = array( 'A' => 0, 'B' => 0, 'C' => 0, 'D' => 0, 'E' => 0, 'F' => 0, 'G' => 0, 'H' => 0, 'I' => 0, 'J' => 0, 'K' => 0, 'L' => 0, 'M' => 0, 'N' => 0, 'O' => 0, 'P' => 0, 'Q' => 0, 'R' => 0, 'S' => 0, 'T' => 0, 'U' => 0, 'V' => 0, 'W' => 0, 'X' => 0, 'Y' => 0, 'Z' => 0 ); I also have got text from a file ($text = file_get_contents('tekst15.txt');) I have putted the chars in that file to an array: $textChars = str_split ($text); and sorted it from A-Z: sort($textChars); What i want is that (with a for loop) when he finds an A in the textChars array, the value of the other array with index A, goes up by one (so like: $alfabet[A]++; Can anyone help me with this loop? I have this atm: for($i = 0; $i <= count($textChars); $i++){ while($textChars[$i] == $alfabet[A]){ $alfabet[A]++; } } echo $alfabet[A]; Problem 1: i want to loop the alfabet array to, so now i only check for A but i want to check all indexes. Problem2: this now returns 7 for each alphabet index i try so its totally wrong :) I'm sorry about my english but thanks for your time.

    Read the article

  • How to split records per hour in order to display them as a chart?

    - by Axel
    Hi, I have an SQL table like this : sales(product,timestamp) I want to display a chart using Open Flash Chart but i don't know how to get the total sales per hour within the last 12 hours. ( the timestamp column is the sale date ) By example i will end up with an array like this : array(12,5,8,6,10,35,7,23,4,5,2,16) every number is the total sales in each hour. Note: i want to use php or only mysql for this. Thanks

    Read the article

  • Why are cookies only sent to http://www.example.com and NOT http://example.com?

    - by Axel
    I have a PHP login which sets 2 cookies once someone login. The problem is that if you login from http://www.example.com and you go to http://example.com, you will find yourself not logged in. I think that is because the browser only send the cookies to the first syntax. It is only one domain, the difference is the www. before the domain name, so how to set cookies to the whole domain whatever there is www. or not? <?php setcookie('username',$username,time()+3600); ?>

    Read the article

  • How to get the root path in JavaScript?

    - by Axel
    I am using mod_rewrite to remap the URLs in my website in the following format: http://www.mydomain.com/health/54856 http://www.mydomain.com/economy/strategy/911025/ http://www.mydomain.com/tags/obama/new The problem is that I am making AJAX calls to a file: http://www.mydomain.com/login.php And I don't want to write the FULL url or even use the ../ trick because there isn't a fixed level of folders. So, what i want is something to access the login.php from the root, whatever the domain name is: $.ajax({ type: "POST", url: "http://www.mydomain.com/login.php" });

    Read the article

  • Anyone knows from where to get that jQuery tags editor?

    - by Axel
    Hi, Someday i've downloaded a very nice jquery editor but i lost it and i only have a screenshot of it. You just type a tag and press return or space and it's will be inside a nice box, and you can delete it by only pressing the backspace key or the close icon. Please don't suggest me That because it's so poor and the tags are inserted outside the input box. Thanks

    Read the article

  • Generics in return types of static methods and inheritance

    - by Axel
    Generics in return types of static methods do not seem to get along well with inheritance. Please take a look at the following code: class ClassInfo<C> { public ClassInfo(Class<C> clazz) { this(clazz,null); } public ClassInfo(Class<C> clazz, ClassInfo<? super C> superClassInfo) { } } class A { public static ClassInfo<A> getClassInfo() { return new ClassInfo<A>(A.class); } } class B extends A { // Error: The return type is incompatible with A.getClassInfo() public static ClassInfo<B> getClassInfo() { return new ClassInfo<B>(B.class, A.getClassInfo()); } } I tried to circumvent this by changing the return type for A.getClassInfo(), and now the error pops up at another location: class ClassInfo<C> { public ClassInfo(Class<C> clazz) { this(clazz,null); } public ClassInfo(Class<C> clazz, ClassInfo<? super C> superClassInfo) { } } class A { public static ClassInfo<? extends A> getClassInfo() { return new ClassInfo<A>(A.class); } } class B extends A { public static ClassInfo<? extends B> getClassInfo() { // Error: The constructor ClassInfo<B>(Class<B>, ClassInfo<capture#1-of ? extends A>) is undefined return new ClassInfo<B>(B.class, A.getClassInfo()); } } What is the reason for this strict checking on static methods? And how can I get along? Changing the method name seems awkward.

    Read the article

  • Why FILTER_VALIDATE_URL return FALSE for only this url?

    - by Axel
    Hi, i have the following code: <?php $pictureurl="http://icons3.iconfinder.netdna-cdn.com/data/icons/pool/poolbird.png"; if(filter_var($pictureurl, FILTER_VALIDATE_URL) === FALSE){ echo "Invalid Url"; exit; }else{ echo "Works!"; } ?> This display "invalid url" for the above url, but not for other simpler urls. Is this a bug? you can even access the image. And the most important is what's the solution for this? Thanks

    Read the article

  • Execute function by pressing "return" using jQuery?

    - by Axel
    Hi, i have two text inputs like the following, i don't want to use <form> , so i want when people press "return" after filling the inputs, a function called "doit()" should be executed. <script> function doit(){ alert("you submitted the info"); ..........ajax code........ } </script> <input type="text" id="email" /> <input type="text" id="skills" /> Thanks

    Read the article

  • PHP how to limit lines in a string ?

    - by Axel
    Hi, i have a variable like the following and i want a function to only keep the first 20 lines, so it will strips any additional \n lines more than 20. <?php $mytext="Line1 Line2 Line3 ....." keeptwentyline($mytext); ?>

    Read the article

  • AttributeError in my Python program regarding classes

    - by Axel Finkel
    I'm doing an exercise out of the Python book that involves creating a class and a subclass. I am getting the following error when I try to run the program: AttributeError: 'Customer' object has no attribute 'name', when it tries to go through this bit of code: self.name.append(name) As this is my first time dealing with classes and objects in Python, I'm sure I am making some overt mistake somewhere, but I can't seem to figure it out. I've looked over the documentation for creating classes and writing member functions, and it looks correct, but it is obviously not. I want the Customer subclass to inherit the name, address, and telephone attributes from the Person superclass, but it doesn't seem to be doing so? Here is my code: class Person: def __init__(self): self.name = None self.address = None self.telephone = None def changeName(self, name): self.name.append(name) def changeAddress(self, address): self.address.append(address) def changeTelephone(self, telephone): self.telephone.append(telephone) class Customer(Person): def __init__(self): self.customerNumber = None self.onMailingList = False def changeCustomerNumber(self, customerNumber): self.customerNumber.append(customerNumber) def changeOnMailingList(): if onMailingList == False: onMailingList == True else: onMailingList == False def main(): customer1 = Customer() name = 'Bob Smith' address = '123 Somewhere Road' telephone = '111 222 3333' customerNumber = '12345' customer1.changeName(name) customer1.changeAddress(address) customer1.changeTelephone(telephone) customer1.changeCustomerNumber(customerNumber) print("Customer name: " + customer1.name) print("Customer address: " + customer1.address) print("Customer telephone number: " + customer1.telephone) print("Customer number: " + customer1.customerNumber) print("On mailing list: " + customer1.OnMailingList) customer1.changeOnMailingList() print("On mailing list: " + customer1.OnMailingList) main()

    Read the article

  • jQuery: Remove Div after 2 combined animations done?

    - by Axel
    Hi, i have a jQuery line that execute 2 animations, what i want is to remove the #flasher DIV after sliding it up by my current code. How to add a callback in this bunch of brackets? here is my code: $("#flasher").animate({opacity: 1.0}, 6000).animate({"top": "-=30px"},"slow"); Thanks

    Read the article

  • How can I add an image out of my documents as a background to this program?

    - by Evan
    Evan is the newest member of the Fort Myers Miracle front office, joining in April. He comes to Florida after spending two seasons with the Colorado Avalanche and Denver Nuggets radio team. The Fort Collins native updates Miracle fans about the season via Twitter, The Miracle iPhone App, and Miracle blog. In his spare time, he enjoys following all things Colorado State.

    Read the article

  • links for 2011-02-03

    - by Bob Rhubart
    Webcast: Reduce Complexity and Cost with Application Integration and SOA Speakers: Bruce Tierney (Product Director, Oracle Fusion Middleware) and Rajendran Rajaram (Oracle Technical Consultant). Thursday, February 17, 2011. 10 a.m. PT/1 p.m. ET. (tags: oracle otn soa fusionmiddleware) William Vambenepe: The API, the whole API and nothing but the API William asks: "When programming against a remote service, do you like to be provided with a library (or service stub) or do you prefer 'the API, the whole API, nothing but the API?'" (tags: oracle otn API webservices soa) Gary Myers: Fluffy white Oracle clouds by the hour Gary says: "Pay-by-the-hour options are becoming more common, with Amazon and Oracle are getting even more intimate in the next few months. Yes, you too will be able to pay for a quickie with the king of databases (or queen if you prefer that as a mental image). " (tags: oracle otn cloudcomputing amazon ec2) Conversation as User Assistance (the user assistance experience) "To take advantage of the conversations on the web as user assistance, enterprises must first establish where on the spectrum their community lies." -- Ultan O'Broin (tags: oracle otn enterprise2.0 userexperience) Webcast: Oracle WebCenter Suite – Giving Users a Modern Experience Thursday, February 10, 2011. 11 a.m. PT/2 p.m. ET. Speakers: Vince Casarez, Vice President of Enterprise 2.0 Product Management, Oracle; Erin Smith, Consulting Practice Manager – Portals, Oracle; Robert Wessa, Consulting Technical Director,  Enterprise 2.0 Infrastructure, Oracle.  (tags: oracle otn enterprise2.0 webcenter)

    Read the article

  • SQLRally Nordic gets underway

    - by Rob Farley
    PASS is becoming more international, which is great. The SQL Community has always been international – it’s not as if data is only generated in North America. And while it’s easy for organisations to have a North American focus, PASS is taking steps to become international. Regular readers will be aware that I’m one of three advisors to the PASS Board of Directors, with a focus on developing PASS as a more global organisation. With this in mind, it’s great that today is Day 1 of SQLRally Nordic, being hosted in in Sweden – not only a non-American country, but one that doesn’t have English as its major language. The event has been hosted by the amazing Johan Åhlén and Raoul Illyés, two guys who I met earlier this year, but the thing that amazes me is the incredible support that this event has from the SQL Community. It’s been sold out for a long time, and when you see the list of speakers, it’s not surprising. Some of the industry’s biggest names from Microsoft have turned up, including Mark Souza (who is also a PASS Director), Thomas Kejser and Tobias Thernström. Business Intelligence experts such as Jen Stirrup, Chris Webb, Peter Myers, Marco Russo and Alberto Ferrari are there, as are some of the most awarded SQL MVPs such as Itzik Ben-Gan, Aaron Bertrand and Kevin Kline. The sponsor list is also brilliant, with names such as HP, FusionIO, SQL Sentry, Quest and SolidQ complimented by Swedish companies like Cornerstone, Informator, B3IT and Addskills. As someone who is interested in PASS becoming global, I’m really excited to see this event happening, and I hope it’s a launch-pad into many other international events hosted by the SQL community. If you have the opportunity, thank Johan and Raoul for putting this event on, and the speakers and sponsors for helping support it. The noise from Twitter is that everything is going fantastically well, and everyone involved should be thoroughly congratulated! @rob_farley

    Read the article

< Previous Page | 3 4 5 6 7 8  | Next Page >