Posts

mysql - Looking up times in DB based off actual time or actual time including Delay -

i looking way able grab rows database time. two columns exist: time - scheduled time delay - +seconds time delayed. let's say: id,time,delay 1,18:23,360 2,18:25,0 3,17:15,-60 now, let's searching buses after arriving at/after 18:25, how include these 2 results: 2,18:25,0 1,18:23,360 (note: 18:23 + 360 seconds = 18:29) in query like where `time` >= '18:23' thanks select * [table] date_add(time,interval timedelay second) >= '18:25:00' mysql date_add function

css - Responsive Bootstrap Tiles (News Like Layout) -

i have been stuck trying obtain particular layout bootstrap finding little success. .row .col-md-8 %h3 title %p description .col-md-4 .row .col-md-12 %p side item 1 .col-md-12 %p side item 2 drawing of attempted layout some of key issues having getting spacing between squares while still having line in clean fashion. i have no idea how 2 elements on right "unstack" when viewed on smaller screen. any or advice appreciated. you can use nested columns layout. acheive equal height story , depends (somewhat) on going inside divs. /**css display purposes only**/ body, html { padding-top: 50px; } .alert.alert-top { height: 300px; border-radius: 0; text-align: center; } .alert.alert-bottom { height: 140px; border-radius: 0; text-align: center; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> ...

c++ - simd code to check if two double values are sufficiently different -

suppose have 2 double values, old , new. implement vectorized function returns old if abs(x-y) < p, , new otherwise. here code (test.cpp): #include <emmintrin.h> #include <iostream> #define array_length 2 int main(void) { // x = old value, y = new value, res = result double *x, *y, *res; posix_memalign((void **)&x, 16, sizeof(double) * array_length); posix_memalign((void **)&y, 16, sizeof(double) * array_length); posix_memalign((void **)&res, 16, sizeof(double) * array_length); double p = 1e-4; // precision __m128d sp = _mm_set1_pd(p); x[0] = 1.5; y[0] = 1.50011; // x - old value, y - new value x[1] = 2.; y[1] = 2.0000001; __m128d sx = _mm_load_pd(x); __m128d sy = _mm_load_pd(y); // sign mask compute fabs() __m128d sign_mask = _mm_set1_pd(-0.); // |x-y| __m128d absval = _mm_andnot_pd(sign_mask, _mm_sub_pd(sx, sy) ); // mask of |x-y| < p __m128d mask = _mm_cmplt_pd(absval, sp);...

jquery - Smoothing out glitchy javascript animation (logical issue) -

sorry misleading title. don't know how else word issue. i'm working on website , i'm having problems transition between animations when rolling on these 2 icons. when roll mouse on either icon, animations run fine, when move on next icon, can see fades out , fades in immediately. looks bad. you can see issue here: http://theromdepot.com/ now correct this, tried checking if either of images hovered when leaving icon, , if not, go ahead , return normal. if either of them hovered, change text , don't fade anything. reason, couldn't work no matter did , scrapped whole thing. if come solution, i'd grateful. here's related javascript: $(document).ready(function(){ $("#cartridge").hover(function(){ document.getelementbyid("archivetext").innerhtml = "view archive"; $("#archivetext").animate({opacity: 1}, 400); $("#slogan").animate({opacity: 0}, 300); $("#recen...

com.handmark.pulltorefresh.library.PullToRefreshListView cannot be cast to android.widget.ListView -

i made activity page fragment page , necessary changes fragment need got error please me out of this. have activity have 2 fragments , 1 one of two.and though list view if click on 2nd 1 display @ other side of same activity page. main functionality want do. public class freagmentmaincategory extends fragment{ private linearlayout lllayoutmain; private fragmentactivity faactivitymain; private listview lstcategorylist; private selectcategorytask mauthtask = null; private view mservicestatusview; categorydetails maincategory; private categorylistadapter adapterlist; static final int menu_manual_refresh = 0; static final int menu_disable_scroll = 1; static final int menu_set_mode = 2; static final int menu_demo = 3; private view lstlistview; private pulltorefreshlistview mpullrefreshlistview; @suppresslint("newapi") @override public view oncreateview(layoutinflater inflater, viewgroup container, ...

ide - Xcode 7.0.1 always crashes immediately when open any project -

i'm using xcode 7.0.1 (7a1001) , os x el capitan i don't know happening! tried load new xcode mac app store , crashes t~t i can't work right long crash log i've got when open project (crashes immediately) https://gist.github.com/macbaszii/9e45fa13a119670ec20a thanks in advance. remove plusgins, , try again. i met same problem, caused "mclog".

parse.com - I encounter some issues using parse on some of my Android devices -

i encounter issues parse regarding device i'm running project on. first tried make parse work on project had issues regarding device using, decided take parsestarterproject ( here ). i opened build.gradle android studio , after checking working on 2 android devices, modified androidmanifest.xml , build.gradle files fit first project. androidmanifest.xml : <?xml version="1.0" encoding="utf-8"?> <!-- ~ copyright (c) 2015-present, parse, llc. ~ rights reserved. ~ ~ source code licensed under bsd-style license found in ~ license file in root directory of source tree. additional grant ~ of patent rights can found in patents file in same directory. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:largeheap="true" package="com.parse.starter"> <uses-permission android:name="android.permission.internet...