Posts

Showing posts from August, 2010

php - wordpress renewal failed, showing blank pages -

i working on renewal of site http://koogen.net/ , created sub-directory under name of /wp/ , installed wordpress, worked on renewed version of website. i got green light , working on changing settings wordpress users can view renewed website accessing koogen.net. i changed site address http://koogen.net/ copied index.php , .htaccess root directory. edited index.php's require(‘/wp-blog-header.php’); require(‘/wp/wp-blog-header.php’); and *edited .htaccess's rewritebase /wp/ to rewritebase / and rewriterule . /wp/index.php [l] to rewriterule . /index.php [l] and thought should work fine. instead gave me blank pages everywhere , can't fix them. i tried wp_debug true setting it's not showing me error messages i guessing messed htaccess or php database. how fix problem... appreciated! thanks in advance!!! update: able turn on debug mode, , gave me error message. parse error: parse error, unexpected t_string, expecting t_old_...

sql - Combine SpqrkSQL and GraphX -

can create stored procedure in sparksql , call graphx api? this: registerfunction("storedproceduregraphx", model.storedproceduregraphx _) select * sometable storedproceduregraphx(nodex, nodey) > 10 if graphx api mean operation on rdd answer no. involve launching new spark task each row isn't idea. , you'd have close on sparkcontext , not serializable - , functions use udfs have be.

C# Linq GroupBy and Count field -

i need group data record date, count occurrence of values in field tipoescola, field can have values 1 or 2, , need total amount of records of grouped date , each value of tipoescola. sorry, know it's little confusing i'm going show using data have.... these records of db: nome email tipoescola datacadastro teste1 email@email.com 2 2015-07-16 10:29:34.140 teste1 email@email.com 1 2015-07-16 10:29:34.140 teste2 email@email.com 2 2015-07-16 10:31:55.337 teste3 email@email.com 2 2015-07-16 12:38:22.403 teste4 email@teste.com 1 2015-07-17 13:33:26.973 teste5 teste@teste.com 2 2015-07-17 13:49:13.850 this managed far: [0] { data = {16/07/2015 10:29:34}, tipo = 2, qntd = 1 } [1] { data = {16/07/2015 10:29:34}, tipo = 1, qntd = 1 } [2] { data = {16/07/2015 10:31:55}, tipo = 2, qntd = 1 } [3] { data = {16/07/2015 12:38:22}, tipo = 2, qn...

python - WSGIScriptAlias does but WSGIScriptAliasMatch DOES NOT regard DirectoryIndex -

this a.conf in /etc/httpd/conf.d/ rather edit httpd.conf work a.conf namevirtualhost *:80 <virtualhost *:80> directoryindex 1 documentroot /a/b/ servername domain.tld wsgiscriptalias /1 /a/1.wsgi wsgiscriptalias /2 /a/2.wsgi </virtualhost> in example if go domain.tld via web.. wsgiscriptalias /1 /a/1.wsgi is automatically executed. but let's rid of wsgiscriptalias , use wsgiscriptaliasmatch instead. <virtualhost *:80> directoryindex 1 documentroot /a/b/ servername domain.tld wsgiscriptaliasmatch ^/(.*) /a/$1.wsgi </virtualhost> now.. when go domain.tld via web.. not see 1.wsgi instead default apache welcome page. so looks like.. wsgiscriptaliasmatch ^/(.*) /a/$1.wsgi is not paying attention directoryindex 1 in other words via web domain.tld/1 works domain.tld not.. what causing ? how wsgiscriptalias /1 /a/1.wsgi can interpret domain.tld domain.tld/1 given directoryindex 1 but.. wsgiscriptaliasmatch ^/(.*) /a/$1.wsgi ...

python - admin search for generic foreign key django -

i trying put admin search on model in generic foreign key present. admin.py class privacysettingsadmin(admin.modeladmin): fieldsets = ( (none, { 'fields': ( 'field_name', 'level', ) }), (('page/article'), { 'classes': ('grp-collapse grp-open',), 'fields': ('content_type', 'object_id', ) }), ) autocomplete_lookup_fields = { 'generic': [['content_type', 'object_id']], } search_fields = ('object_id',) i able search using object_id . want search using feilds of object_id object. ex. user has foreign key model. want search privacy setting of user using username , first_name , email , last_name . thanks in advance. try below codes: in models.py: class privacysettings(models.model): ... def object_username(self): ...

java - Selenium sendKeys() different behaviour for Chrome, Firefox and Safari -

Image
below simple snippet of code. @findby(classname = "element-to-press") private webelement elementtopress; // other code keys move = keys.arrow_down; gridcontainer.sendkeys(move); in firefox works fine. in chrome i've got "org.openqa.selenium.webdriverexception: unknown error: cannot focus element" error safari not react sendkeys() also i've tried use approach: keys move = keys.arrow_down; actions actions = new actions(driver); actions.movetoelement(element).click(); // focus on element actions.sendkeys(move).perform(); this code fixed chrome "cannot focus element" error, browser still not react keys.arrow_down/keys.arrow_up/keys.arrow_left/keys.arrow_right events safari , firefox not react sendkeys() well. i cannot understand going on , how can make code run browsers. environment : os x 10.9.5 latest version of chrome/safari/firefox selenium version 2.44.0 upd: update selenium version 2.46. works chrome ,...

java - Intellij equivalent of Eclipse syso -

i trying switch eclipse intellij. immediatelly have found problem. in eclipse can type: syso and presss: ctrl + space bar and result in: system.out.println what equivalent shortcut in intellij? equivalent shortcut in intelij sout just type sout list of shortcut. choose option want write , press enter.

javascript - cannot read property 'insertBefore' of null - handsontable.full.js:3714 -

i tried run example mentioned in quick start link( quick start ). downloaded files via git hub. when trying run example mentioned in quick start getting following error "cannot read property 'insertbefore' of null - handsontable.full.js:3714". please me running basic example. version used - v0.16.1 code: <!doctype html> <html> <head> <script src="dist/handsontable.full.js"></script> <link rel="stylesheet" media="screen" href="dist/handsontable.full.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> var data = [ ["", "ford", "volvo", "toyota", "honda"], ["2014", 10, 11, 12, 13], ["2015", 20, 11, 14, 13], ["2016", 30, 15, 12, 13] ]; var container = document.getelementbyid('example...

xml - xsi:schemaLocation element type not bound -

pretty new xml. validator throws error. full error prefix "xsi" attribute "xsi:schemalocation" associated element type "mpreader" not bound. heres clip of xml <?xml version="1.0" encoding="utf-8" standalone="no"?> <mpreader xmlns="c:\users\dallan\desktop\mpreader\" xmlns:xs="http://www.w3.org/20one/xmlschema-instance" xsi:schemalocation="c:\users\dallan\desktop\mpreader\mpreaderschemafinal.xsd"> <firmware>"3.4.16"</firmware> <hardware>"2.3.53"</hardware> <sn>"234-1three5"</sn> and clip of xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns="c:users/dallan/desktop/mpreader/" elementformdefault="qualified" targetnamespace="c:\users\dallan\desktop\m...

Bootstrap 3 modal slideshow -

i have problem regarding bootstrap 3 modal has slideshow (swiper) inside. when put on modal isn't working when put on clasic page working. i have tried use shown.bs.modal myswiper.update() , no luck. can me ? this solution problem $('#mymodal').on('shown.bs.modal', function () { myswiper.update(); });

creating a database for clash of clans (or similar game) -

i still brand new playing databases , wanting create tracking database few games clash of clans. i unsure of how structure tables. here end result: select user user inputs levels of buildings. stored in table. the tricky part(at least me) determining buildings , levels available based upon user's current levels. example: current level of user th7 , laboratory level 5 , spell factory 3 spells available @ th7 b c. factory level 3 spells b , laboratory spell can reach maximum of 3 , spell b can reach maximum of level 2. my thought 1 giant table of permutations of buildings , prerequisites. doesn't seem right. on simplified? keep in mind there mulitple buildings of same kind i.e. 5 archer towers, 5 cannons, etc. my queries player current levels prereqs lookup building available current th level. determine buildings , levels missing. display those. there nice webpage doing (clasofclans-tracker) want recreate own usage , adopt other games. more learning exercis...

ios - Local Storage icons in IPhone DCIM folder -

Image
when plug iphone (6 plus) windows computer, see "local storage" (named in turkish "yerel disk") icons in dcim folder. idea these, viruses?? there might possible answer. https://discussions.apple.com/thread/6585223?start=15&tstart=0

spring integration - How to provide a response based on a publisher confirm -

i have web service ingests objects, sends notification on amqp, , returns json response requester. each request performed on single thread , trying implement publisher confirms , struggling on how should set up. have working don't way doing it. the way doing is: put headers on message have publish-subscribe-channel 2 subscribers subscriber 1) creates blocking queue ready , sends message on amqp subscriber 2) begins pulling 5 seconds on queue until gets confirm the amqp:outbound-channel-adapter sends publisher confirms service activator the publisherconfirmreceiver receives confirm , puts in blocking queue causing subscriber 2's pulling complete , return result of confirm. this technique work don't making assumption chain going receive message before waitforpublisherconfirm service activator publish subscribe channel. in case order matters regarding component receives message first. if waitforpublisherconfirms service activator receives message first block...

parallel execution of tasks at a time in all hosts in ansible -

i want run tasks parallel 30 hosts in ansible @ time. me execution of playbooks doing 1 after another. not requirement.because seems tasks done serially. me execution of tasks done @ time.while running playbook tasks completing 1 after another.so how in servers @ time. so please give suggestion done tasks parallelly @ time in hosts.

Enum class in python -

this question has answer here: how can represent 'enum' in python? 43 answers i create enum class in python. need get_str() method, like: class operation (object): start = 0 stop = 1 (...) def get_str(self): operation_dispatcher = { operation.start: "start", operation.stop: "stop", (...) } return operation_dispatcher[self] but unfortunately approach doesn't work. objects ints , got error message 'int' object has no attribute 'get_str'... have idea how implement functionality? i tried like: operation.get_str(operation_reference) operation_reference.get_str() update: class enummeta(type): def __getattribute__(self, name): return self(super(enummeta, self).__getattribute__(name)) class enum(object): __metaclass_...

c# - Total Sum with multiple where clause LINQ -

i have sql query works fine in sql server. select sum(convert(float,[amount])) [transaction] [response_code] = '100' , merchant_id = '14 while converting linq, resultant query , exception receiving. doing wrong? linq = float count = dbcontext.transactions.where(trx => trx.response_code.equals("100")) .where(trx=>trx.merchant_id.equals(mid)) .sum(i => float.parse(i.amount)); error = {system.invalidoperationexception: not translate expression 'table(transaction).where(trx => trx.response_code.equals("100")).where(trx => trx.merchant_id.equals(convert(invoke(value(system.func`1[system.nullable`1[system.int32]]))))).sum(i => parse(i.amount))' sql , not treat local expression. @ system.data.linq.sqlclient.objectreadercompiler.generator.generate(sqlnode node, localbuilder locinstance) @ system.data.linq.sqlclient.objectreadercompiler.generator.generatebody...

JavaScript: list files from http -

can retrieve list of files located in uri (http server) javascript? find methods rely in server side scripting (ie, list php reads , outputs file list accessing filesystem) if store list in single file or know locations want check, can use ajax request on client side make http request , subsequently load data own server. if pulling data domain differs 1 serving page runs ajax request, run problem "cross origin request" prevent implementing feature.

node.js - NodeJS: Rotating JPEG with GM not working -

i'm writing api endpoint accept images , send them s3 server. before that, however, has orient images correctly not display wrong when in image tags. since jpegs use exif data determine image rotation , img tag not refer exif data orientation information, images appear sideways on website, right side on other platforms. here code rotating image: if (file.mimetype == 'image/jpeg'){ var exifdata = parser.create(uploadedfile).parse(); if (exifdata.tags.orientation == 6 || exifdata.tags.orientation == 8){ var degrees = exifdata.tags.orientation == 6 ? 90 : 270; gm(file.path).rotate('black', degrees).write(file.path, function(err){ if (err) return cb1(err); finish(); }); }else finish(); }else finish(); finish() function sends file off s3. why image not rotating? have set overwrite existing file on rotate. there no errors being returned, entire call fail.

c# - How to create Word Addin Pane scroll button -

Image
i'm creating own word addin, , i'd recreate scroll effect microsoft uses these little arrow buttons on top/bottom of panes (like document recovery panel below). ideas? i couldn't find other solutions, created this: panelscrollcontrol

livechat - Where is the StackExchange Chat room? -

this informative users of site. came across chat section stackoverflow. @ risk of ding thought useful know it. so chat room located? stackexchange - stackoverflow chat room link

Virtualbox 5.0 - install error (your system has not been modified) -

i install vbox 5.0 on windows 10 (pro insider preview), got error message durring installation. your system has not been modified what can do? should problem? log file more details error message? i found answer problem same error message not use it. change "hkey_local_machine\system\controlset001\control\network\maxfilters" 8 20 there no data name. thanks in advance! the problem solved time. received upgrage microsoft. maybe got final version of windows 10. after installation successful.

Tag library descriptor file for AngularJS -

how can add tag library descriptor file( .tld file) in angularjs (in html page) i have tried using taglib tag <%@ taglib prefix="his" uri="/web-inf/tld/xyz.tld" prefix="sample"%> but in html page it's giving warning as multiple annotations found @ line: - invalid text string ( <%@ taglib prefix="his" uri="/web-inf/tld/xyz.tld" prefix="sample"%> }

ajax - How to combine jQuery-functions with different selectors -

i have unknown number of different id's looks #send_1 , #send_2 , on. need call jquery each of id like: $(document).on("submit", "#send_1", function(e){ var i=1; if (something true) { } }); $(document).on("submit", "#send_2", function(e){ var i=1; if (something true) ) { } }); so write hundred times same function changing _x there shall more propper way solve this. i dont use jquery if there me out appreciate. thanks in advance. use attribute starts with (^=) selector $(document).on("submit", '[id^="send_"]', function(e){ var i=1; if (something true) ) { } });

Auto positioning of tooltip using AngularJS -

i want position tooltip automatically, if @ top of browser scrollbar, , there link tooltip in first line tooltip must displayed @ bottommid. is there way using angularjs only? i using angular-ui-bootstrap <a href="#" tooltip-template="'tool.html'" tooltip-class="customclass">my template</a> <style> .tooltip.customclass .tooltip-inner { color: #414141; background-color: #f1f1f1; box-shadow: 0 6px 12px rgba(0,0,0,.175); } .tooltip.customclass .tooltip-arrow { display: none;} </style> <script type="text/ng-template" id="tool.html"> <span>special tooltip <strong>markup</strong></span> </script>` we tracking via https://github.com/angular-ui/bootstrap/issues/375 , not have coded solution @ moment. however, please feel free subscribe issue updates , see this link above issue workaround. things may little ...

python - Scrapy and Selenium error : Element not found in the cache - perhaps the page has changed since it was looked up Stacktrace -

i want extract data amazon. source code : scrapy.contrib.spiders import crawlspider scrapy import selector selenium import webdriver selenium.webdriver.support.select import select time import sleep import selenium.webdriver.support.ui ui scrapy.xlib.pydispatch import dispatcher scrapy.http import htmlresponse, textresponse extraction.items import produititem class runnerspider(crawlspider): name = 'products' allowed_domains = ['amazon.com'] start_urls = ['http://www.amazon.com'] def __init__(self): self.driver = webdriver.firefox() def parse(self, response): items = [] sel = selector(response) self.driver.get(response.url) recherche = self.driver.find_element_by_xpath('//*[@id="twotabsearchtextbox"]') recherche.send_keys("a") recherche.submit() resultat = self.driver.find_element_by_xpath(...

c - Bitwise operators: Printing the numbers 1 to 100 using bit manipulation -

i believe possible generate numbers 1 100 using bitwise operations or bit manipulation, rather traditional increment instruction. what possible methods of doing this? i believe there couple of ways achieve it. 1 of them use tilde operator ~x bitwise complement , equal -(x+1) int increase(int x){ return (-(~x)); } so increment value above-mentioned function , print it. apart own answer, found way make addition bitwise operators . int add(int x, int y) { if (y == 0) return x; else return add( x ^ y, (x & y) << 1); } just substitute y 1 , way of incrementing value.

swift - Adding SKPhysicsJointFixed with proper coordinate -

Image
i want add 2 physics bodies body when showsphysics on looks that. here code use // set anchor point self.anchorpoint = cgpointmake(0.5, 0.5) // setup physics self.physicsworld.gravity = cgvectormake( 0.0, -5.0) self.physicsworld.contactdelegate = self // set physics body let borderbody: skphysicsbody = skphysicsbody(edgeloopfromrect: self.frame) borderbody.friction = 0.0 self.physicsbody = borderbody; self.physicsbody?.categorybitmask = bodytype.edge.rawvalue // setup background color let skycolor = skcolor(red: 81.0/255.0, green: 192.0/255.0, blue: 201.0/255.0, alpha: 1.0) self.backgroundcolor = skycolor let hero = skspritenode(color: uicolor.whitecolor(), size: cgsizemake(38, 38)) hero.physicsbody = skphysicsbody(rectangleofsize: hero.size) hero.physicsbody?.usesprecisecollisiondetection = true hero.physicsbody?.velocity = cgvectormake(0, 0) hero.physicsbody?.restitution = 0.0 hero.physicsbody?.friction = 0.0 hero.physicsbody?.angulardamping = 0.0 hero.physicsbody?.lin...

java - cannot find symbol error using javax.soud.midi -

i trying follow along "head first java" book. half way in book program "music machine" explain principles along way. sadly cant figure out how rid of compiling-error: musictest1.java:6 error: connot find symbol sequencer sequencer = new midisystem.getsequencer(); ^ symbol: class getsequencer location: class midisystem 1 error that code: import javax.sound.midi.*; public class musictest1{ public void play(){ try{ sequencer sequencer = new midisystem.getsequencer(); system.out.println("yay made sequencer object"); }catch(midiunavailableexception ex){ system.out.println("failed make sequencer object"); } } public static void main(string[] args){ musictest1 mt = new musictest1(); mt.play(); } } can problem because in book use java 5.0 , use java 8 on virtual machine, or did ma...

MATLAB dsolve not working -

i'm solving diffusion equation in matlab particular system, there problem second solution get, nsub(r). ideally want function of r 2 undetermined constants , while first part of expression indeed besselfunctions contains ,r, 'ignoreanalyticconstraints', true). know how solve problem , goes wrong? here code: clear clc %%%%%% constants %%%%%%% r_nw=50*10^(-9); pitch_nw=500*10^(-9); f_sub=10^18; f_nw=10^18; l_nw=100*10^(-6); %%%%%% diffusion on wire %%%%% tau_nw=1000*10^(-9); d_nw=1*10^-9; lambda_nw=sqrt(d_nw*tau_nw); %%%%%% diffusion on substrate %%%%%%% tau_sub=100*10^(-9); d_sub=1*10^(-9); lambda_sub=sqrt(d_sub*tau_sub); %%%%%% diffusion equation on wire %%%%%%%% syms nw(z) nw = dsolve(d_nw*diff(nw,z,2) == -f_nw + nw/tau_nw,nw(l_nw)==0); nw(z)=simplify(nw); dnw = diff(nw,z); %%%%%% diffusion equation on substrate %%%%%% syms nsub(r) nsub = dsolve(diff(nsub,r,2)+1/r*diff(nsub,r) == -f_sub + nsub/tau_sub); dnsub = diff(nsub,r);

javascript - Mongoose - What does the exec function do? -

i came across piece of mongoose code included query findone , exec() function. ive never seen method in javascript before? exactly? basically when using mongoose, documents can retrieved using helpers. every model method accepts query conditions can executed means of callback or exec method. callback : user.findone({ name: 'daniel' }, function (err, user) { // }); exec : user .findone({ name: 'daniel' }) .exec(function (err, user) { // }); therefore when don't pass callback can build query , execute it. you can find additional info in mongoose docs . update something note when using promises in combination mongoose async operations mongoose queries not promises. queries return thenable , if need real promise should use exec method. more information can found here . during update noticed didn't explicitly answer question: ive never seen method in javascript before? exactly? well it's not native j...

java - Android: How to retrieve MIDI events at the right time? -

i trying retrieve midi events at right time midi file, within android app. the following code works on standard jvm (on computer), using javax.sound.midi api. sequencer sequencer = midisystem.getsequencer(); sequence sequence = midisystem.getsequence(new file(filename)); sequencer.setsequence(sequence); sequencer.open(); sequencer.gettransmitter().setreceiver(new receiver() { @override public void send(midimessage message, long timestamp) { system.out.println(arrays.tostring(message.getmessage())); } @override public void close() { } }); sequencer.start(); unfortunatelly, javax.sound.* package not available on android. porting android available on github ( https://github.com/kshoji/javax.sound.midi-for-android ) code sample above doesn't work ( sequencer.gettransmitter() returns null). does know how that? didn't found interesting library ( http://www.midi.org/aboutmidi/android.php ) want do. thank you.

r - How to convert a rotated NetCDF back to normal lat/long? -

i have netcdf file rotated coordinates. need convert normal lat/long coordinates (-180 180 long , -90 90 lat). library(ncdf4) nc_open('dat.nf') for dimensions, shows: [1] " 5 variables (excluding dimension variables):" [1] " double time_bnds[bnds,time] " [1] " double lon[rlon,rlat] " [1] " long_name: longitude" [1] " units: degrees_east" [1] " double lat[rlon,rlat] " [1] " long_name: latitude" [1] " units: degrees_north" [1] " char rotated_pole[] " [1] " grid_mapping_name: rotated_latitude_longitude" [1] " grid_north_pole_longitude: 83" [1] " grid_north_pole_latitude: 42.5" [1] " float tasmax[rlon,rlat,time] " [1] " long_name: daily maximum near-surface air temperature" [1] " stan...

excel - Remove object required message in cancel option of inputbox -

is there way remove error message(object required message) pops out input box whenever user presses cancel button? sub workingduofunctioncode() dim rng range, inp range 'to remove 0 values may result of formula or direct entry. set inp = selection inp.interior.colorindex = 37 set rng = application.inputbox("copy to", type:=8) rng.parent.activate rng.select inp.copy worksheets("sheet2").paste link:=true each cell in range("a1:cl9935") if cell.value = "0" cell.clear next end sub not quite sure why using inputbox, don't use in code. this should take care of errors. sub workingduofunctioncode() dim rng range, inp range 'to remove 0 values may result of formula or direct entry. set rng = nothing set inp = selection inp.interior.colorindex = 37 on error resume next set rng = application.inputbox("copy to", type:=8) on erro...

hadoop - Hive always create mapreduce job -

i'm been using hive @ work, when run select "select * tablename" hive executes mapreduce job , when run "select * tablename limit x" independently of x. hive doesn't execute mapreduce jobs. i use hive 1.2.1, hdp 2.3.0, hue 2.6.1 , hadoop 2.7.1 any ideas fact? thanks! select * table; requires no map nor reduce. there no filter(where statement) or aggregation function here. query reads hdfs.

html - Full viewport element -

i'm trying come how fullscreen intro element cover 100 of viewport in size of browser window? , when start scrolling, can see rest of homepage. please have @ example link below. https://mtrexpress.se/sv they using movie, i'm interested in simple div , use background image cover screen. have tried analyze webpage, , guess not using background poperties, instead div different layers? interesting learn how done. i made simple test, , filled lot of dummy text(i removed text before pasted code here), seems intre div stays fullscreen , can't scroll rest of page. <!doctype html> <html> <head> <style> #intro { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: red; } </style> </head> <body> <div id="intro">intro</div> <div class="container">page content</div> </body> </html> you need use viewport percentage lengths , vw , vh viewport...

SQL Server Invalid Column Name Error -

i have invalid column name error when inserting record sql server table. here's definition: create table [dbo].[mytable] ( [id] int identity(1, 1) not null, [person_name] varchar(255) not null, [modified_by] varchar(255) not null ) on [primary] (data_compression = none); go and insert insert mydb.dbo.mytable (id, person_name, modified_by) values (1, 'aishwarya', 'admin') but following error upon execution: lookup error - sql server database error: invalid column name 'modified_by'. i can select column fine. thing i've noticed in error "by" capitalized, contrary table definition. ideas? update: updating syntax errors, apologeez is database set case sensitive collation? can check running query: select databasepropertyex('<insert database name>', 'collation') sqlcollation; case insensitive collations have ci in name, such sql_latin1_general_cp1_ci_as . where case sensitiv...

Need help in Caesar Cipher in C -

i new programming , trying write program in c caesar cipher. input consists of integer ilength equal length of string, followed string str , integer encrypt. my input is: 11 middle-outz 2 output: okffng-qwv@ required output is: okffng-qwvb below code have written. me why getting last character wrong in output! i'm totally clueless. #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int ilength = 0, encrypt = 0, = 0, j = 0; char alph_base[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'x', 'y', 'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', ...

raspberry pi - C# Windows IoT - Update GUI from task -

i have tried lot can't find out how update gui element example textblock.text running task on windows universal app windows iot on raspberry. is there way this? it should work out of running task without stopping it. according answer have tried this: task t1 = new task(() => { while (1 == 1) { byte[] writebuffer = { 0x41, 0x01, 0 }; // buffer write mcp23017 byte[] readbuffer = new byte[3]; // buffer read mcp23017 spidisplay.transferfullduplex(writebuffer, readbuffer); // send writebuffer mcp23017 , receive results readbuffer byte readbuffer2 = readbuffer[2]; // extract correct result string output = convert.tostring(readbuffer2, 2).padleft(8, '0'); // convert result output format // update frontend textblock status5 result windows.applicationmodel.core.coreapplication.mainview.corewindow.dispatcher.runasync(coredis...

javascript - PHP square heatmap over Image -

Image
well start of image have display (can anything), , lot of data on area of image rated 1-5 here image of grid have display heat map on as data this from_x, from_y, to_x, to_y, score 878, 1148, 1620, 2093, 1 0, 0, 2498, 2025, 3 0, 0, 1013, 675, 5 675, 2228, 1958, 3105, 1 203, 203, 1148, 1080, 3 203, 135, 1553, 1350, 4 now first thing have done sum of single square, looks this {"0_0":2.6666666666666665,"0_1":2.6666666666666665,"0_2":2.6666666666666665,"0_3":2.6666666666666665,"0_4":2.6666666666666665,"0_5":2.6666666666666665,"0_6":2.6666666666666665,"0_7":2.6666666666666665,"0_8":2.6666666666666665,"0_9":2.6666666666666665,"0_10":1.5,"0_11":1.5,"0_12":1.5,"0_13":1.5,"0_14":1.5,"0_15":1.5,"0_16":1.5,"0_17":1.5,"0_18":1.5,"0_19":1.5,"0_20":1.5,"0_21":...

mysql - Selecting data IN(subquery) -

this query works fine: select * produkty id_sklep_kategorie in(669, 670, 671, 672, 673, 674, 683, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 845, 846, 847, 848, 849, 850, 851, 898); but want have more automatically, tried this: select * produkty id_sklep_kategorie in(select id_sklep_kategorie sklep_kategorie); but returns me records... how can this? it ought return record selecting id_sklep_kategorie inquery. have selected ids inquery, records whole query. per understanding, need pass ids if need specific rows, have provided.