Posts

Showing posts from March, 2010

sql - SSRS 2008 - grouping sets? -

if have list object groups tablix according country value in dataset, possible add own custom combinations? e.g. if have uk, france, germany, us, japan boxes, , 1 eu puts uk france , germany in 1 group? i can in sql server 2008 grouping sets, can similar thing done in ssrs? you can add calculated field dataset (right-click on it). in expression it, use switch statement decide group name. can use calculated field in report other field.

c# - Telerik HTML5 Report Viewer - Error loading the report viewer's templates -

i'm having issue trying use telerik rest services , html5 report viewer. here's scenario: i have c# console application hosting rest services api. have set project per telerik's article: how to: self host telerik reporting rest web api . seems working without issue. able go http://localhost:8080/api/reports/formats , expected results, suggests me rest server available , processing requetss. i set separate project run report viewer. c# windows forms application, has webbrowser element pointing url of report viewer html file. report viewer html file default generated file when create new telerik html 5 report viewer in visual studio - builds of necessary pieces you. here code: <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>telerik html5 report viewer</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <meta http-

Extending a java swing button? -

i want each jbutton have number or id associated it. why decided extend jbutton class make class superjbutton. how include value of id/number in action event generated when button clicked class responds action can access id ? another alternative doesn't require sub-classing, use jcomponent.putclientproperty(object key, object value) store id associated button. it can retrieved using getclientproperty(object key) . public void actionperformed(actionevent e) { jcomponent comp = (jcomponent)e.getsource(); keyobject kobj = (keyobject)comp.getclientproperty("button.id"); } that might bit more flexible can attach id every button without need use application specific code e.g. when using gui builder it's bit complicated change creation code button, or when need use existing components.

amazon web services - Can I run a bat file from aws lambda? -

i have bat file on aws windows 2012 server instance. possible run aws lambda function (python or node) execute bat file? thanks if understand question correctly, you're asking if it's possible have lambda function connect ec2 instance , execute .bat file? if that's question, answer "no" unless (i think) ec2 instance publicly available. currently, lambda functions not have access behind vpc. https://aws.amazon.com/lambda/faqs/ q: can access resources behind amazon vpc aws lambda function? aws lambda functions cannot access resources behind vpc. https://aws.amazon.com/blogs/aws/aws-lambda-update-python-vpc-increased-function-duration-scheduling-and-more/ the above blog post said available late 2015 (though written in oct 2015), it's still not available. as suggested, try using ec2 run command instead.

linux - Running Java from terminal : cannot find text files -

i using java in eclipse file manipulation editing, searching, etc. instance have 2 text files. 1 "sales.txt" , other "employees.txt". user supposed input beginning date , ending date arguments. program finds dates match , between. there computes commission employees in found sale dates for. here's problem: using kali linux (debian) , have create shell script compiles , runs java program command line arguments. for example: shell script called "runner". type: ./runner [start date] [end date] upon doing compiles fine no warnings. when program executed terminal shows this: cannot find employees or sales .txt when use run configurations in eclipse , edit arguments panel [start date] [end date] program runs fine. here projects panel looks in eclipse: edit - here test shell script: #! /bin/bash javac /$home/workspace/java\ projects/database_2/src/src/*.java cd /$home/workspace/java\ projects/database_2/src java src.runner $1 $2 edit

How to combine 2 mysql queries -

Image
i have following 2 queries. query 1 : select distinct(thread_id) records client_name='myclient' query 2 : select max(thread_no) records thread_id='loop_result_from_above_query' , action='reviewed' is possible combine them single query ? the second query run on every result of first query. thank you. see attached image of small snippet of mysql records. i need single mysql query output records have action="myaction" latest records given set of thread_ids. in sample data set : record sr: 7201 i hope helps in helping me :) select client_name, thread_id, max(thread_no) max_thread records action='reviewed' , client_name='myclient' group client_name, thread_id update 1 select a.* records inner join ( select thread_id, max(sr) max_sr records group thread_id ) b on a.thread_id = b.thread_id , a.sr = b.max_sr a.action

java - How to better design class structure for this code -

i making data structure called scalar . interface declares operations available(like multiply/divide/add/subtract). anyways have 3 different classes implements scalar . fractionalscalar represented numerator , denominator , generalscalar represented string. normally add accessor scalar interface double get() . stuff like public class fractionalscalar implements scalar { public scalar multiply(scalar other) { return new fractionalscalar(this.get() * other.get()); } .... // other methods } but works because fractionalscalar represented double. "generalscalar" cant represented numeric value because supposed theoretical value. not sure theoretical best word here meant. scalar = generalscalar('a'); scalar b = generalscalar('b'); scalar 1 = simplescalar(1); // class extends fractionalscalar , used represent integers scalar 2 = simplescalar(2); so if want represent 2a two.multiply(a);

c - Neural network for linear regression -

Image
i found great source matched exact model needed: http://ufldl.stanford.edu/tutorial/supervised/linearregression/ the important bits go this. you have plot x->y. each x-value sum of "features" or how i'll denote them, z . so regression line x->y plot go h(sum(z(subscript-i)) h(x) regression line (function) in nn idea each z-value gets assigned weight in way minimizes least squared error. the gradient function used update weights minimize error. believe may propagating incorrectly -- update weights. so wrote code, weights aren't being correctly updated. i may have misunderstood spec stanford post, that's need help. can verify have correctly implemented nn? my h(x) function simple linear regression on initial data. in other words, idea nn adjust weights data points shift closer linear regression. for (epoch = 0; epoch < 10000; epoch++){ //loop number of games (game = 1; game < 39; game++){ sum = 0; int temp1

Hosting more than 25 WCF services in Azure -

we're running azure's limit of 25 internal endpoints our wcf services. in keeping soa principles, our wcf services small, 1 per "noun" in our system. defining 1 azure internalendpoint per service contract. want add our 26th wcf service can't because of limit of 25 endpoints. don't want arbitrarily start combining service contracts because of azure limitation. question: there better way host lots of wcf services doesn't require 1 endpoint per service contract? here's example csdef file snippet: <servicedefinition name="mydeployment" xmlns="http://schemas.microsoft.com/servicehosting/2008/10/servicedefinition"> <workerrole name="myworkerrole" vmsize="small"> <endpoints> <internalendpoint protocol="tcp" name="iuserservice" /> <internalendpoint protocol="tcp" name="iarticleservice" /> <internalendpoint protocol=

Android: Flip layout horizontally -

say layout has button aligned left, , textview aligned right. i languages layout displayed is, others, button should on right while text should on left. is there built-in or simple way dynamically flip layout views? i create differenet layout , set content view dynamically, rather avoid solution if better suggested. thanks here in sample code changing layout on button click can put come login according need likewise if laguage = "bl bla" call layout1(); else call layout2(); i not creating different layout same layout assigning different layout properties @ dynamically. <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <button android:id="@+id/btn1" android:layout_width="wrap_content" android:layo

asp classic - Is it possible to use a variable for the object ID in a global.asa Object -

i'm messing around global.asa , i'm wondering if it's possible create unique object id's using variables. below example. <object runat="server" scope="session" id="tdi" progid="tdrules.td_engine"></object> my id tdi. if appended session.sessionid unique id every session. looks this. i'd use session variable reference unique object id throughout current project. session("tdisession") = "tdi_" & session.sessionid <object runat="server" scope="session" id=session("tdisession") progid="tdrules.td_engine"></object> and if possible, there reasons so?

facebook - PHP Fatal error: Class 'RemoteWebElement' not found in -

Image
i have symfony project run normal in command line: php app/console server:run but, want run inside phpstorm. when try this, gives fatal error: php fatal error: class 'remotewebelement' not found in i tried oficial documentation of classe: http://facebook.github.io/php-webdriver/classes/remotewebelement.html . didn't found information culd me. i added compose dependency: composer require facebook/webdriver but had no effect! ======================================= i'll explain step-step how bug (it long!): i have: php 5.5.9 phpstorm 10.0.3 composer 1.0-dev (7117a5775ffdcdfd31bbd52a138a6f9c65e7e3c2) 2016-02-03 so, create new symfony project (current version 3.0) , add composer dependencies: symfony new project cd project composer update then, open project inside of phpstorm , configure settings run project: settings -> languages & frameworks -> php "php language level": 5.5 "interpreter": 5.5.

ruby on rails - Remove CarrierWave file from associated model -

what proper way remove attachment through associated model? i have profile.rb model has_one will.rb model. edited through same form profile. i'm able attach file using :will_attachment field trying use :remove_will_attachment checkbox doesn't work. the params structure follows: "portfolio" => {"will_attributes" => {"remove_will_attachment" } } i have :will_attachment , :remove_will_attachment in permitted params method. i'm having remove attachment checking remove_will_attachment == "1" in params , manually calling @portfolio.will.remove_will_attachment! seems there should smoother way this. am missing something? thanks! it bug in carrierwave solved on master branch . reason not remove uploaded file if remove_#{column} attribute accessor set. in carrierwave 0.10, not work "portfolio" => {"will_attributes" => {"remove_will_attachment" => t

java - LWJGL Vertex and Fragment Shaders Wont Compile (Error CO206) -

i have been interested in learning opengl while. every time start working it, same error when compiling shaders. error code spits out. 0(1) : error c0206: invalid token "invalid atom 483265304" in version line i have tried looking error , haven't found of anything... , nothing provided incite on how fix problem. i not know c or c++ using lwjgl. here code i'm using compile shaders: private static int loadshader(string file, int type){ //system.out.println("loading shader."); stringbuilder shadersource = new stringbuilder(); try { bufferedreader reader = new bufferedreader(new filereader(file)); string line; while((line = reader.readline())!=null){ //system.out.println(line); shadersource.append(line).append("/n"); } reader.close(); //system.out.println("closed reader."); } catch (ioexception e) { system.err.println("could not

Concatinate 3 Database Table and Converting Rows into Column - SQL Server -

i have 3 database table **tblsites** | sites | sitename | aa aaaaaaaa bb baaaaaab cc caaaaaac dd daaaaaad **tblweb** | webid | appname | appurl | servername | 1 aweb www.aweb.com servera 2 bweb www.bweb.com servera 3 cweb www.cweb.com serverb 4 dweb www.dweb.com servera 5 eweb www.eweb.com serverc 6 fweb www.fweb.com serverc 7 gweb www.gweb.com serverd 8 hweb www.hweb.com serverd **tblwebservices** | sites | webid | summarystate | last_check | 1 ok 02/01/2016 10:00:00.000 1 critical 02/01/2016 10:00:04.000 2 ok 02/01/2016 10:00:04.000 2 critical 02/01/2016 10:00:06.000 3 ok 02/01/2016 10:00:07.000 3 ok 02/01/2016 10:00:09.000 4 ok 02/01/2

c# - Query populate string based on dictionary lookup -

so have following query iqueryable<feedback> query = db.feedbacks; var result = query .select(s => new feedbackviewmodel { businessid = s.account.businesses.firstordefault().businessid, hiresuccess = s.hiresuccess.value, useagain = s.useagain.value, suggestions = s.suggestions, employees = numbergroups[s.numemployees.value] }); return result; and im getting error additional information: linq entities not recognize method 'system.string get_item(int32)' method, , method cannot translated store expression. due attempting set employees string dictionary lookup, dictionary looks this. public static dictionary<int, string> numbergroups = new dictionary<int, string>() { { 0, "none" }, { 9, "1 9" }, { 19, "10 19" }, { 49, "20 49&qu

php - Unsetting local variables -

there couple of examples of behavior in code igniter framework - creating variable @ beginning of method, working it, , before end of method, unsetting variable. why unset them? what's point? far know, local variables die @ end of method anyways. code igniter, session class (see last lines): function sess_read() { // fetch cookie $session = $this->ci->input->cookie($this->sess_cookie_name); // no cookie? goodbye cruel world!... if ($session === false) { log_message('debug', 'a session cookie not found.'); return false; } // decrypt cookie data if ($this->sess_encrypt_cookie == true) { $session = $this->ci->encrypt->decode($session); } else { // encryption not used, need check md5 hash $hash = substr($session, strlen($session)-32); // last 32 chars $session = substr($session, 0, strlen($session)-32); // md5 hash match? prev

html - Issue with getting a style setting from javascript -

so trying each time button pressed circle gets wider. have ran peculiar issue, block of code when put in alert() method shows properly, shows nul if put variable display it. here full code. <!doctype html> <html> <head> <title>css basics</title> <meta charset="utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> #circle { width:200px; height:200px; border-radius:200px; background-color:red; } </style> </head> <body> <div id="circle">asdfasdf</div> <button id="saver"> press me save text </button> <input id="text" type="text" value="test"/> <script type="text/javascript"> var divid=&quo

javascript - Script to send email to multiple addresses -

i using google sheet send automated pre-filled email whenever fills out required fields in google sheet. how can make following script send different emails based on location user enters? example if user enters london send email email1@email.com or if user enters paris send email email2@email.com. also, need add trigger google sheets know when initiate script? function fireemail(e){ var username = e.values[1]; var timestamp = e.values[0]; var medaltype1 = e.values[2]; var medaltype2 = e.values[3]; var medalcolor = e.values[4]; var medalrecipient = e.values[5]; var dateneeded = e.values[6]; var medallocation = e.values[7]; var emailbodyhtml = []; emailbodyhtml += '<b>you have received medal request ' + username + '.</b>'; emailbodyhtml += '<p>onboarding ops medal type, if applicable: ' + medaltype1 + '</p>'; emailbodyhtml += '<p>service ops medal type, if applicable: ' + medaltype2 +

php - Update database if data exists -

i have database contains 2 columns. product's name , it's quantity. have 2 forms, input user add new product, , input him add quantity. other form updating quantity when product gets sold. the issue facing when user uses second form in order update quantity of specific product, of product's quantity inside database subtracted well. hope explained problem right. full code: <?php class tablerows extends recursiveiteratoriterator { function __construct($it) { parent::__construct($it, self::leaves_only); } } $servername = "localhost"; $username = "root"; $password = ""; try { $conn = new pdo("mysql:host=$servername;dbname=program", $username, $password); $conn->setattribute(pdo::attr_errmode, pdo::errmode_exception); echo "<script>alert('connected successfully');</script>"; } catch(pdoexception $e) { echo "connection failed: " . $e->

typescript - How to sort a list of objects using an Angular 2 Pipe -

i trying create pipe sort array of custom type. // custom-object.ts export class customobject { constructor( public somestring: string, public somenumber: number ) {} } in html is: // custom-object-form.component.ts <div class="form-group"> <label for="cricos_course_code">object: </label> <select class="form-control" required [(ngmodel)]="model.somestring"> <option *ngfor="#object of (customobjects | sortarrayofcustomobjects)" [value]="object.somestring">{{object.somestring}}</option> </select> </div> then code pipe: // sort-custom-object.pipe.ts import {pipe, pipetransform} 'angular2/core'; import {customobject} '../custom-object'; @pipe({name: 'sortarrayofcustomobjects'}) export class sortarrayofcustomobjectspipe implements pipetransform { transform(arr:array<customobject>): { return

php - Using PHPMailer if form submits -

i'm trying run phpmailer if form submitted. i've tried few different ways no success. i'm not sure part of code sends email. when test using if(!$mail->send()) { echo 'message not sent.'; echo 'mailer error: ' . $mail->errorinfo; } else { echo 'message has been sent'; } it works, know runs correctly. ideas why code doesn't work? <?php require_once 'c:\wamp\www\phpmailer\phpmailer-master\phpmailerautoload.php'; $mail = new phpmailer; //$mail->smtpdebug = 3; // enable verbose debug output $mail->issmtp(); // set mailer use smtp $mail->host = 'smtp.gmail.com '; // specify main , backup smtp servers $mail->smtpauth = true; // enable smtp authentication $mail->username = 'test@gmail.com'; // smtp username $mail->passwo

Looking for lightweight responsive CSS framework supporting max width 968px -

i have been looking using css framework next project. use css framework responsive , should have max-width: 968px should lightweight system (only grids), not requiring buttons, navigation etc. there recommendations on css frameworks should use, problem seem come across frameworks set predefined size such 960px , seems break whenever make changes support 968px size (it may lack of experience of using frameworks , lack of understanding). i looking recommendations on css framework use, , on setting max width 968px; thanks in advance. i don't know of responsive platforms run (old) 960px wide standard. every platform i've seen somewhere around 1140px. that said however, use columnal , modify 968px wide. columnal light weight, supports columns within columns, , class names pleasant work with. (though find , replace , rid of _'s , change them -'s). need change max-width: value on class .row in columnal.css . note*** have tested changing .row 968px

java - can Struts Support HTML5? -

i have been using struts framework have implement html 5 on application is possibke have makje changes in struts tag library? since have embeded html tags <html:form action="action.jsp" type="sample" name="applyform" > can 1 help? there no html5 specific taglib struts 1.x. (you tagged 'struts', i'm assuming using). write own extending standard struts taglib. shouldn't prove difficult. option use regular jsp el/jstl.

javascript - String.prototype.myFunction not returning a string? -

why below code not return this properly? should return 'image', rather of letters in object, shouldn't it? string.prototype.removeextension = function(){ return (this.lastindexof('.') !== -1) ? this.substr(0, this.lastindexof('.')) : this; } 'image.jpg'.removeextension(); // returns 'image' 'image.png.jpg'.removeextension(); // returns 'image.jpg' 'image'.removeextension(); // returns string {0: "i", 1: "m", 2: "a", 3: "g", 4: "e", removeextension: function} this references object within context of scope (*) . need invoke .tostring() instance, pseudo primitive value out of it. return this.tostring(); if return this that, it'll reference current instance of string-object invoked. (*) (only exception es5 strict mode, this might reference undefined value

java - JFrame repainting image blinking -

i having issue command super.paintcomponents(g); when updating jframe. issue having image loading blinking while code running. pretty sure code double buffering , have not found helpful resource online solve issue. first question please tolerate formatting errors. here entire code (snippets below): public class game extends jframe implements keylistener, mousemotionlistener { int mousex, mousey; public static arraylist<images> images = new arraylist<images>(); public static string lastkeypressed = null; public game() { this.addmousemotionlistener(this); this.addkeylistener(this); } public void mousedragged(mouseevent e) { mousex = e.getx(); mousey = e.gety(); } public void mousemoved(mouseevent e) { mousex = e.getx(); mousey = e.gety(); } public void keypressed(keyevent e) { if (e.getkeycode() == e.vk_left) { lastkeypressed = "left"; } else if (e.getkeycode() == e.vk_right) { lastkeypressed = "righ

iphone - iPhone5 Button Placement using IF statement? -

i have game whereby button pause supposed on top right hand corner, on iphone 5 3/4 way top, tried manually set cannot work, works, on iphone 3 & 4 not show (so it's ignoring part of if statement) ccmenuitemsprite* item1 = [ccmenuitemsprite itemwithnormalsprite:[ccsprite spritewithfile:[[maininfo shareinstance] getimagename:@"pause1.png"]] selectedsprite:[ccsprite spritewithfile:[[maininfo shareinstance] getimagename:@"pause2.png"]] target:self selector:@selector(soundoff)]; ccmenu *menu = [ccmenu menuwithitems:item1, nil]; if ( ![[maininfo shareinstance] isipad] ) menu.position = ccp(290, 450); //450 iphone3/4 // else if (is_iphone_5) { // specific iphone 5 menu.position = ccp(290, 530); //450 iphone3/4 }else men

javascript - How to set Array String through JS Post Back to Web Method? -

how send array strings js post web method in asp.net, code sample below: function service() { var items = $('#jqxtree').jqxtree('getcheckeditems'); // var jsontext = json.stringify({ list: items }); mydata = {}; (index in items) { mydata[index] = items[index].label; } $.ajax({ type: "post", url: "serviceconfiguration.aspx/processindexes", data: "{'jsonvalue': " + json.stringify(mydata) + "}", contenttype: "application/json; charset=utf-8", datatype: "json", async: false, cache: false, success: function (msg) { } }); //alert(items); } now trying following: [webmethod(enablesession = true)] [scriptmethod(responseformat = respo

qt - Adding Icons to Combobox Items such that Icons are visible at the Right Side -

i working on application in need show list of program names , corresponding icons in combobox popup menu. i tried following things: a. created custom widget deriving qcombobox b. reimplemented showpopup() function follows void cmycombobox::showpopup() { qcombobox::showpopup(); mp_popup = this->findchild<qframe *>(); mp_popup->move( mp_popup->x(), mp_popup->y() - this->height() - mp_popup->height() ); } c. adding items combobox qstring name = "xyz"; qicon icon("sample.png"); mycombobox->insertitem(0, icon, name); question is: when insert using above method, inserts icon @ left side(i.e.., icon followed name) . how make icons come @ right side(i.e.., first name followed icon) regards santhosh qcombobox uses qabstractmodel showing data. can replace standard model custom 1 using function void qcombobox::setmodel ( qabstractitemmodel * model ) . icon position in relation text cont

ruby on rails - Why is my raty stars not working/loading/appearing in Heroku although it works perfectly fine on development? [SOLVED] -

i tried solution can found here precompiling locally, changed jquery.raty.js jquery.raty.js.erb , others doesn't worked me. i placed star-half.png, star-off.png, , star-on.png in app/assets/images while jquery.raty.js in app/assets/javascripts i need please! edit: epic solution worked me this : config/environments/production.rb from: config.assets.compile = false to: config.assets.compile = true

r - Specifying different axis labels between facets -

Image
i specify breaks , colors 2 facets independently. there way this? using code ggplot(data, aes(x = x, y = y)) + geom_point() + scale_y_continuous(breaks = c(0:3, 4, 6, 8)) + facet_wrap(~group, scales = "free") i can add additional breaks need on bottom facet, don't want these top. in other words, i'd have 0, 1, 2, 3 bottom plot , 0, 2, 4, 6, 8 top plot. i don't have idea of how specify different colors labels between facets (let me know if should open separate question colors). one way plot each group separately, lay out plots together: library(gridextra) p1 = ggplot(data[data$group=="group1",], aes(x = x, y = y)) + geom_point() + scale_y_continuous(breaks = c(0:3, 4, 6, 8)) + facet_wrap(~ group) p2 = ggplot(data[data$group=="group2",], aes(x = x, y = y)) + geom_point() + scale_y_continuous(breaks = c(-1:3)) + facet_wrap(~ group) grid.arrange(p1, p2, ncol=1) if

java - How to insert my first and subsequent rows into a my database for android project -

i have databasehelper class builds tables , handles queries, etc. however, 1 thing stumps me. i have checklist table following columns: checklist_id, int, primary key start_time, text end_time, text this "insertchecklist()" method, inserts row table: public long insertchecklist(checklist checklist){ // reference of checklistdb database sqlitedatabase db = this.getwritabledatabase(); // make values inserted contentvalues values = new contentvalues(); values.put(checklistcontract._id, checklist.getid()); values.put(checklistcontract.column_name_start_time, checklist.getstarttime()); values.put(checklistcontract.column_name_end_time, checklist.getendtime()); // insert new row, returning primary key value of new row long newrowid; newrowid = db.insert( checklistcontract.table_name, null, //column_name_nullable (set null not insert new row there n

javascript - Iron router meteor to publish only one item in a collection -

how write publish method iron router gets subscribe on item in collection meteor.publish('patients', function(){ return newpatient.find(); }); i have tried subscription on routes 1 item still subscribes items in collection figured had publish method. please help you should add publisher takes id parameter: meteor.publish('patient', function (patientid) { check(patientid, string); return newpatient.find(patientid); }); then on client, can subscribe this: meteor.subscribe('patient', this.params._id); also see subscriptions section of ir guide more details.

html agility pack - HtmlAgilityPack add new element and copy all inline css attributes to the new one -

is there way copy inline css attributes 1 node new node add in htmlagilitypack ? as far can tell can't assign 1 htmlattributecollection another, can copy them 1 one this: foreach (htmlattribute attr in oldnode.attributes) newnode.attributes.add(attr);

android - This app won't run unless you update Google Play Services (via Bazaar) -

Image
i'm testing out new google maps api v2 android, , i'm getting message when app launches: this running on 4.1 emulator. here androidmanifest.xml file: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.maptest" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="15" /> <permission android:name="com.example.maptest.permission.maps_receive" android:protectionlevel="signature"/> <uses-permission android:name="com.example.maptest.permission.maps_receive"/> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices"/> <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.perm

javascript - Jquery .eq plus contains -

when trying [tr] second [td] contains information, keep getting stuck on logic. here example. <table class="todos"> <tbody> <tr> <td>info1</td> <td>info2</td> <td>info3</td> </tr> </tbody> </table> and here javascript find me... $(".todos tbody tr").css('display','none'); $(".todos tbody tr").each(function(){ if($(this).find("td:eq(0):contains("+procurar+")")) $(this).css('display','table-row'); if($(this).find("td:eq(1):contains("+procurar+")")) $(this).css('display','table-row'); }); you're hiding parent tr , setting display property on td 's won't show them, if that's not intended functionality, i'd do: $(".todos tbody tr").hide().find('td:lt(2)').filter(function() { return $(this).t

javascript - How to hide geoxml3 markers when loading KML files? -

Image
i have geoxml3 parser reading (multiple) kml files onto google map, , have red arrow/markers showing up. there way suppress them? var myoptions = { center: new google.maps.latlng(39.397, -100.644), zoom: 4, maptypeid: google.maps.maptypeid.roadmap }; var map = new google.maps.map(document.getelementbyid("map_canvas"), myoptions); var geoxml = new geoxml3.parser({ map: map, singleinfowindow: false, afterparse: usethedata }); geoxml.parse('data/file1.kml'); geoxml.parse('data/file2.kml'); geoxml.parse('data/file3.kml'); there several ways suppress markers. the simplest remove <point> geometries placemarks in kml. you can write post processing function hide them after created you can create custom createmarker function doesn't create markers example of hiding markers

web services - Restlet android client / jersey java server -

i have created rest web service using jersey in java ee app. , able create client in java app well. worked fine. i'm trying consume web service, time using android. i understood jersey libraries not android oriented (is true ? please confirm information ) , read restlet alternative build android client. how possible ? have tutorials or documentation can read purpose ? "i understood jersey libraries not android oriented (is true ? please confirm information )" this pretty obvious. if search on jersey site, nothing shows up. also, it's pretty hard find tutorial restlet on android. think have adapt java version. personally, use plain http client rest stuff. (i think many people that.) regarding restlet, might find these useful: http://weblogs.asp.net/uruit/archive/2011/09/13/accessing-odata-from-android-using-restlet.aspx http://restlet.org/learn/guide/2.1/editions/android/ http://blog.restlet.com/2009/05/06/restlet-available-on-android

PHP MS-SQL 2008 Characters Proplem -

while querying mssql server 2008 php codes, turkish characters not supported. made default character set utf8 still doesn't work. kind higly appreciated. regards, we have problem turkish characters follows: ığüşiöç iĞÜŞİÖÇ

Django session variable in JavaScript -

can use django session variable in javascript? in django: request.session['email'] = 'xxxxxxxxxxx@gmail.com' in js: sessionstorage.getitem("email") you create simple view: class sessionvarview(templateview) def get(self, request, *args, **kwargs): return httpresponse(request.session[kwargs['key']]) and in urls.py add: url(r'^session/(?p<key>[^/]+)$', sessionvarview.as_view(), name='session-var'), then js via http://your.site.address/session/key_name_here or similar. (note - top of head, , not tested)

javascript - Jquery Cookie return undefined [only in ie] -

iam using jquery cookie .cookie return undefined in ie (only 1 machine).help me resolve issue. js code var cookie = {}; cookie["version"] = 1; cookie["columnstate"] = { "width": 100, "hidden": true }; cookie["columnstate1"] = { "width": 200, "hidden": false }; $.cookie("state", json.stringify(cookie), { expires: 365 }); $("#getcookie").click(function () { alert($.cookie("state")); }); html <button id="getcookie">get cookie</button> this working me on ie8 var cookie = {}; cookie["version"] = 1; cookie["columnstate"] = { "width": 100, "hidden": true }; cookie["columnstate1"] = { "width": 200, "hidden": false }; jquery.cookie("state", json.stringify(cookie), { expires: 365 }); alert(jquery.cookie("state")); i using jquery.cookie.js v

sql server - Bit conversion not working in SSRS report -

Image
i'm working on ssrs report. have dataset returns below values. now wanted change color of data field on bases of bit . i tried below, no success. shows false in report. =iif(cbool(fields!isauthorized.value)=true,"blue","black") =iif(cint(fields!isauthorized.value)=1,"blue","black") =iif(fields!isauthorized.value=1,"blue","black") below image show isauthorized.value on data field. please me! have here.. http://www.sqlservercentral.com/forums/topic1459800-1063-1.aspx for example: =iif( fields!isstate.value <> 0 , fields!regionid.value <>"12","yes","no") so yours should like: =iif( fields!isauthorized.value <> 0 ,black,blue) this should cover it.