Posts

Showing posts from May, 2014

Value Errors When Retrieving Images With Scrapy -

i'm having trouble using scrapy's image pipeline retrieve images. error reports, think feeding scrapy right image_urls. however, instead of downloading images them, scrapy returns error: valueerror: missing scheme in request url: h. this first time using image pipeline feature, suspect i'm making simple mistake. same, i'd appreciate solving it. below you'll find spider, settings, items, , error output. they're not quite mwes, think they're pretty simple , easy understand same. spider: import scrapy scrapy.spiders import crawlspider, rule scrapy.linkextractors import linkextractor ngamedallions.items import ngamedallionsitem scrapy.loader.processors import takefirst scrapy.loader import itemloader scrapy.loader.processors import join scrapy.http import request import re class ngaspider(crawlspider): name = 'ngamedallions' allowed_domains = ['nga.gov'] start_urls = [ 'http:

java - Array Index Out of Bounds Error While Populating From a Text File -

i having trouble error trying populate array text file. think might have if loop, i'm not sure. it's giving me out of bounds error on mydata[9] . want check see if first letter d (meaning following stuff update), , make update object. update.txt file has 10 things in populate mydata with, why confused why mydata[9] giving me out of bounds error (specifically try set equal lastthirty ). scan = new scanner(file); while (scan.hasnext()) { string str = scan.nextline(); string[] mydata = str.split("#"); if (mydata[0].equalsignorecase("d")) { recordtype = mydata[0]; actioncode = mydata[1]; boxid = integer.parseint(mydata[2]); movieid = integer.parseint(mydata[3]); movietitle = mydata[4]; moviegenre = mydata[5]; releaseyear = mydata[6]; instock = mydata[7]; totalrentals = integer.parseint(mydata[8]); lastthirty = integer.parseint(mydata[9]); updates[co

c# - How can you make progress bar colors more vibrant? -

Image
doing in c# wpf. me seems progressbar colors washed out; not vibrant: is because they're animated? color being called 'leadership' progress bar straight system color "red". there value can set make these colors 'pop' , brighter , more intense?

ajax - Rails Conditional Facebook OG Tags -

i have rails personality test app uses ajax render questions , show results. i have been attempting share personality test results via facebook sending variable 1 of dashboard rails controller dynamically create tags. however, variable nil when page first loaded (which causes error), fixed adding conditional (in application.html.erb): <% if @cat %> <meta property="og:title" content="you got <%= @cat.name %>!"/> <meta property="og:image" content="<%= @cat.picture %>" /> <meta property="og:description" content="<%= @cat.description%>" /> <meta property="og:url" content="https://mysite" /> <meta property="fb:app_id" content= "<%=env['facebook_app_id']%>" /> <meta property="og:type" content="website"> <% end %> facebook

c - Using Kernel Modules Functions in a Custom System Call - Undefined Reference Error -

Image
i'm beginner c , linux developer i'm sorry if sounds confusing. i managed create simple system call updating syscall_64.tbl, adding asmlinkage method definition syscalls.h, adding folder main makefile , creating makefile has 1 line: obj-y := syscall.o no problems until this, compiled linux source code , worked. want build more advanced system call. added function vmx.c(which in arch/x86/kvm): void myfunction(void){ //some code } export_symbol(myfunction); and defined in vmx.h(it in arch/x86/include/asm): void myfunction(void); now problem begins. included vmx.h syscall.c file , called function. i'm getting "undefined reference myfunction" when try compile linux source code. doing wrong? syscall.c: #include <linux/kernel.h> #include <linux/syscalls.h> #include <asm/vmx.h> asmlinkage long sys_customsyscall(const char *test) { printk(kern_alert "test: %s,\n", test); myfunction(); return 0; } after thi

java - how to set request hostname in httpclient -

i use apache httpclient send request site, site check servlet request hostname. checks hostname this: string hostname = request.getremotehost(); and when send request, hostname ip address, not hostname. send request code this: httpclientbuilder httpclientbuilder = httpclientbuilder.create(); list<header> headerlist = new arraylist<>(); headerlist.add(new basicheader("host","mycustomhostname")); httpclientbuilder client = httpclientbuilder.build(); httpget request = new httpget("http://siteaddress:8080/gethostname"); request.setheader(new basicheader("host","mycustomhostnameagain.just.for.try")); client.execute(request); but not works. how set request hostname in httpclient? thx. request.getremotehost() not use headers http request. instead doing reverse dns lookup . takes ip got request , tries dns information. possible that information doesn't exist in case call returns ip address string.

mysql - i have tow table which contain on same column like UserID. How to get all row by subquery -

i have tow table contain on same column userid 1. employee -------------------------------------------------------- id userid name description 1 username1 fullname1 employee description1 2 username2 fullname2 employee description2 -------------------------------------------------------- 2. user_info -------------------------------------------------------- id userid password 1 username1 password1 2 username2 password2 -------------------------------------------------------- i have user_info data. want employee table row according user_info data "subquery" want use subquery syntax i don't know why want subquery, try this, maybe works;) select e.* employee e exists ( select 1 user_info u e.userid = u.userid ) -- maybe conditions else need, can add or can try this, select e.* employee e e.userid in ( select u.useid user_info u ) anyway, perhaps other solution exists...

PageSpeed - Eliminate render-blocking JavaScript for jQuery -

i have jquery added @ bottom of page. however, when run site on pagespeed insights (mobile), error: eliminate render-blocking javascript , css in above-the-fold content page has 2 blocking script resources , 1 blocking css resources. this causes delay in rendering page. none of above-the-fold content on page rendered without waiting following resources load. try defer or asynchronously load blocking resources, or inline critical portions of resources directly in html. see: http://learnyourbubble.com , https://developers.google.com/speed/pagespeed/insights/?url=http%3a%2f%2flearnyourbubble.com&tab=mobile however, jquery added @ bottom of page. should below fold. please me remove error! this article should explain lot of what's happening: https://varvy.com/pagespeed/critical-render-path.html in short though problem chrome need load jquery , foundation javascript give initial render of page. why blocking. because javascript comes

jquery store array localstorage or cookie -

Image
i want store array in order use after refresh page browser or history forward (if website in history). this array important me because contains history urls of visited website pages. allows me detect , forward browser buttons. for example i've got history_url_array = []; , how can store in local or in cookie easly , compatible html4 , html5 without plugin script? i success kind of thing variable : self.name= window.location.pathname; sorry english, i'm french... to set array (in case history_url_array ) in localstorage , use localstorage["history"] = json.stringify(history_url_array) on page refresh, array localstorage , var history = json.parse(localstorage["history"]) but mind browser support. ie has been shaky in support html 5 components. here's support table : anyway better run function before start using localstorage . function supports_html5_storage() { try { return 'localstorage' in window &&a

Android app will only display one JSON element -

Image
i'm making app class retrieve stock information api. have set way retrieve json data based on user's input stock symbol. there 2 textviews right now, 1 shows company name , 1 shows stock change value. however, textview has text set first displayed, other 1 unaffected. here console output when search button clicked: 04-24 23:24:29.782 8144-8589/com.webdesigners.stockmarket w/system.err: android.view.viewrootimpl$calledfromwrongthreadexception: original thread created view hierarchy can touch views. 04-24 23:24:29.783 8144-8589/com.webdesigners.stockmarket w/system.err: @ android.view.viewrootimpl.checkthread(viewrootimpl.java:6357) 04-24 23:24:29.783 8144-8589/com.webdesigners.stockmarket w/system.err: @ android.view.viewrootimpl.invalidatechildinparent(viewrootimpl.java:909) 04-24 23:24:29.783 8144-8589/com.webdesigners.stockmarket w/system.err: @ android.view.viewgroup.invalidatechild(viewgroup.java:4690) 04-24 23:24:29.783 8144-8589/com.webdesigners.stockmar

python - How to return a variable multiple times and create an array -

i creating shop/inventory system python rpg , return several variables function in shop. create 3-5 items every time shop visited right if print 1 of returned variables print info last item created. need able store each unique items values in array each item can called on not last one. if plus == 0: #if item made has plus equal nothing if has_add == 'yes': #if has add if item_type == 'weapon': #if weapon (no plus, has add, weapon) created_item = print(str(count) + ". " + quality + " " + wep_adj + " " + "" + weapon_type + " of " + wep_add + "..........attack: " + str(weapon_attack) + " price: " + str(wep_price)) #print if item_type == 'armor': #if armor (no plus, has add, armor) created_item = print(str(count) + ". " + quality + &quo

How to make Python executable pause when it raises an error? -

so know can make python executable using pyinstaller . however, every time raises error, instantly end program, can't find error. i know can use time.sleep(30000) stop it. but if code raises error before meets time.sleep(30000) , shut down. to sum up, how make keep not shutting down, can see mistake? if running executable double clicking, try running console. e.g. in windows: in cmd, run cd executable_path myexecutable.exe a better way introduce logger other modules logging implemented can write files. also, can put code in try-except block: try: #my_code_here print('here exception is') except exception e: print('unexpected error:' + str(e))

android - Getting the values from the different fragments from ViewPager -

i developing application fragments being generated dynamically. private void setupviewpager(viewpager viewpager) { adapter = new viewpageradapter(getsupportfragmentmanager()); (int = 0; < sequence_no.size(); i++) { adapter.addfragment(fragmenttwo.newinstance(i,(i+1))); } viewpager.setadapter(adapter); } now suppose there 3 fragments got generated. generated fragments have different widgets edittext, spinner etc. mannage have 1 flag notifies me 1 displayed(spinner or edittext). i have 1 button in activity upon click need values fragments bu how getting value first fragment only. i putting wrong sample on here know wrong keeping reference purpose. below code on submit button click values array list. if (fragmenttwo.ed_complain != null) { values.add(fragmenttwo.ed_complain.gettext().tostring()); } if (fragmenttwo.cb_complain != null) { values.add(fragmenttwo.cb_complain.gettext().tostring()); } if (

c - What configure options were used when building binutils? -

i have version of binutils compiled someone. need recompile new binutils same options. i know gcc -v prints out configuration options. maybe there way read build options binutils ? i found support platforms , binutils version can check with: #ld -v gnu ld (gnu binutils ubuntu) 2.22 supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om so ld -v shows should use in --enable-targets . i didn't found way options tried , check , current set of options: ./configure --prefix=/opt/dev-tools-4.9 \ --exec-prefix=/opt/dev-tools-4.9 \ --with-sysroot=/ --enable-multilib \ --with-lib-path=/opt/dev-tools-4.9/lib \ --disable-werror --enable-shared \ --with-pkgversion="gnu binutils ubuntu" \ --enable-targets=x86_64-linux-gnu,i686-linux-gnu,x86_64-pc-mingw32,i686-pc-mingw32 make -j $(nproc || grep -c ^processor /proc/cpuinfo|| echo "1") && \ make install

asp.net - Asp label replace by HTML label I want text property for HTML label -

i using html label in asp.net website. want html label text property how declare text property html label control ? can put text inside <label> tag: <label runat="server" id="lblhello">hello</label>

SH72867 with I2C -

i using ‘sh72867(renesas)’ connect ‘eeprom(24lc04b)’ . in customer’s document @ ‘address 0xf0 of eeprom have data 0x5555’, when reading address return ‘0xffff’ , same other address. can’t write eeprom too. used i2c sample of renesas not run. have suggestion setting i2c? sorry bad english , no clear explanation. any apprciated, thanks verify common issues: data , clock connected properly. pull resistor on clock , data connected vcc. loop i2c read request, connect scope , verify i2c signals ok. in addition check ack bit. verify clock lower 400khz. when using code examples, fit specific board. verify code example configuration same board. some mcu may have more 1 i2c pinout options. code example might use i2c module connected diffrent pins.

vb.net - How to get count in output variable using a stored procedure? -

select count(*) tblrequest group requeststatusid this query return column having total requests respective status id . i want total requests count respective statusid in output variables using stored procedure. this query return column having total requests respective status id. i want total requests respective statusid in output variable using stored procedure. i.e. returns column like ______________ |nonamecolumn| |------------| | 21 | | 6 | | 14 | |------------| i want each row value in output variable separately (eg. set @pending=21, set @sent=6, set discarded=14 ), using stored procedure , vb.net code. in simple words: how can row's values in variable sql server stored procedure? create procedure countrequests @requests int output select @requests = count(*) tblrequest group requeststatusid or select select count(*) requests tblrequest group requeststatusid

mips - Sorting array assembly -

i don't know what's wrong code. in advance .data array: .space 40 prompt: .asciiz "enter integer (0 quit):" text: .asciiz "after sorting, list of integers is:" .text .globl main main: la $a1, array read_numbers: li $v0, 4 la $a0, prompt syscall li $v0, 5 syscall sw $v0, 0($a1) addiu $a1, $a1, 4 beqz $v0, sort j read_numbers sort: la $a1, array li $v0, 4 la $a0, text syscall loop: lw $t0, 0($a1) addiu $a1, $a1, 4 beqz $t0, done li $v0, 1 move $a0, $t0 syscall j loop done: i'm trying make array , fill unordered numbers , sort them after that. i'm able input them output isn't being sorted providing error attempt execute non-instruction @ 0x00400080.

javascript - Get individual values from Third Party Response Data in HTML page -

i need how individual values html page. got response payu payment gateway team in html page need individual attributes values tacking transaction below response getting payu team: <h1>this success url</h1> <p>your transaction completed successfully. bank response mihpayid=403993715514374636&amp;mode=&amp;status=failure&amp;unmappedstatus=usercancelled&amp;key=gtkffx&amp;txnid=txn1r23fw&amp;amount=100.00&amp;discount=0.00&amp;net_amount_debit=0.00&amp;addedon=2016-04-25+10%3a48%3a29&amp;productinfo=oxygenconcentrator&amp;firstname=test&amp;lastname=&amp;address1=&amp;address2=&amp;city=&amp;state=&amp;country=&amp;zipcode=&amp;email=test%40gmail.com&amp;phone=8152709721&amp;udf1=&amp;udf2=&amp;udf3=&amp;udf4=&amp;udf5=&amp;udf6=&amp;udf7=&amp;udf8=&amp;udf9=&amp;udf10=&amp;hash=6a9d21bd423d61cd5a7d91098aa1140314e45eaddd8d4b9148399caba8

WPF, C# - change selected tab by doubleclick on a datagrid's row -

i have datagrid in tabcontrol item. when doubleclick row in datagrid, want tabcontrol change tab. heres code: <tabitem x:name="tidashboard" header="dashboard" background="white"> <grid> <datagrid isreadonly="true" x:name="dganzeigewerk" autogeneratecolumns="false" margin="0,10,0,249" headersvisibility="column" rowheight="25" horizontalalignment="left" width="492"> <datagrid.resources> <style targettype="{x:type datagridrow}"> <eventsetter event="control.mousedoubleclick" handler="dganzeigewerk_r

extract details from mysql table data -

i have mysql table consists of 1000 records. in content field there anchor tag , want extract author name content field , insert in author field of same table. content <p> when air conditioning, escalators, , advertising appeared, shopping expanded scale, limited spontaneity. , became more predictable, scientific. had once been surprising became manipulated.</p> <p class="bq_fq_a"> <a id="qut" title="rem_koolhaas"> rem koolhaas </a> </p> <br> here can see author rem koolhaas. want extract author , update author field in same table this. in cell there different content format same.all rows consists of anchor. in addition have 3 more columns in table tag1,tag2,tag3. have 50 tags (like success,fun,morning,beach etc )which want match content , place them in tag1,tag2,tag3 if matches table id content author tag1 tag2 tag3 1 given above blank bl

Can I refresh Eclipse Project Explorer automatically? -

can refresh explorer without pressing f5 button? want keep refresh while running project. i'm using eclipse mars 4.5.1 there's new preference settings > general > workspace > refresh on access (aka lightweight refresh). preference causes eclipse automatically refresh resources when discovers they're 'out-of-sync'. when opening, reading or searching files, it'll prevent out-of-sync errors occurring. other option preference settings > general > workspace >refresh using native hooks or polling if option turned on workspace resources synchronized corresponding resources in file system automatically using native refresh providers (on windows) or polling mechanism. note : can potentially lengthy operation depending on number of resources have in workspace. for more details can eclipse refresh resources automatically?

c# - What is the error "member names cannot be the same as their enclosing type" means when creating a constructor, and how to solve it? -

when tring create constructor class same class name. why throws error saying follows: " error: 'staveprocessor': member names cannot same enclosing type" code : namespace imageprocessing { class staveprocessor { public bitmap stave; public staveprocessor(bitmap image) //constructor { stave = image; } } } how solve , create constructor? ps: please consider self not expert , excuse me asking silly question if, , me learn , identify. thank you well code you've provided has no issues in (it compiles), exception you're getting show if did following: class staveprocessor { // can't have method name (note void, it's not constructor) public void staveprocessor(bitmap image) { stave = image; } }

c# - Visual Studio 2015 - EnvDTE Read ErrorList -

i'm create small build tool. things should do: try build solution , output errors. not have following problem: in case build fails cannot read errorlist. program gets stuck , waits until forever. i've created small test class nothing else creating instance of visual studio 2015, build given solution , read out errorlist on build fail. class class1 { dte2 dte = (dte2)system.activator.createinstance(system.type.gettypefromprogid("visualstudio.dte.14.0", true)); public void test() { int id = dte.localeid; //dte.mainwindow.visible = true; dte.events.buildevents.onbuilddone += new _dispbuildevents_onbuilddoneeventhandler(buildevents_onbuilddone); string solutionfile = @"c:\myprojects\solutionwithbuilderrors.sln"; dte.solution.open(solutionfile); while (!dte.solution.isopen) system.threading.thread.sleep(100); console.writeline("start build"); dte.soluti

jsf - authentication mechanism NTLM in wildfly -

as valve in wildfly no longer available, don't found examples ntlm autehntication new authenticationmecanism in wildfly, waffle negociationfilter not working because using jsf , phaselistener "aferphase" redirect login page. as have login-config form redirect jsf component , phaselistener before servlet filter. it working if delete login config , securityconstraint on jsf pages not efficient not securited @ all we don't want spnego solution (with kerberos) , jbossnegociation working valve anyone have working solution? found guy ntlmmechanism servletextension no explaination , no code !on , don't manage make work.... thank in advance !

ios - UIController View error -

i created array of images , collectionview displaying 9 images grid. there error while using image outlet , collectionview array.i declared name myimage , mydescriptionlabel image inside cell , label respectively. have indicated error commenting it. collectionviewcontroller.h file :- #import <uikit/uikit.h> @interface collectionviewcontroller : uicollectionviewcontroller @property (strong, nonatomic) iboutlet uicollectionview *mycollectionview; @property (strong, nonatomic) iboutlet uiimageview *myimage; @property (strong, nonatomic) iboutlet uilabel *mydescriptionlabel; @end collectionviewcontroller.h file :- #import "collectionviewcontroller.h" @interface collectionviewcontroller () { nsarray *arrayofimages; nsarray *arrayofdescription; } @end @implementation collectionviewcontroller static nsstring * const reuseidentifier = @"cell"; - (void)viewdidload { [super viewdidload]; [[self mycollectionview]setdatasource:self];

jquery - ajax in django cannot work when submit the form -

i want submit form , update result div. the question : 1. alert not work 2. page changed to: result so,where problem. here simple view: def run_tool(request,tool_id): return httpresponse("hello_boss") the js this: $('#btn_excute').click(function(){ var frm = document.getelementbyid("tool_form"); var fdata=frm.submit(function(e){ alert("in"); $.ajax({ type:frm.attr('method'), url:frm.attr('action'), date:frm.serialize(), success:function(data){ var rlst= document.getelementbyid("run_result"); rlst.html(data); }, failure:function(data){ alert("unknown error"); } }); alert("done"); }); return false; }); template : {% block b

java - Command in my bukkitplugin not working -

now have changed 'commands' 'commands' in plugin.yml error in cmd when run server. error says '.jar file not contain plugin.yml'. this plugin.yml of now: name: wand version: 1.0 main: me.pixel.main commands: wand: and main file currently: package me.pixel; import java.util.arraylist; import java.util.list; import org.bukkit.chatcolor; import org.bukkit.effect; import org.bukkit.material; import org.bukkit.command.command; import org.bukkit.command.commandsender; import org.bukkit.entity.player; import org.bukkit.event.eventhandler; import org.bukkit.event.listener; import org.bukkit.event.block.action; import org.bukkit.event.player.playerinteractevent; import org.bukkit.inventory.itemstack; import org.bukkit.inventory.meta.itemmeta; import org.bukkit.plugin.java.javaplugin; public class main extends javaplugin implements listener { public main plugin; public list<string> spells = new arraylist<string>(); public gettargets

unix - read a value from list and writing it in command line in shell script -

this question has answer here: list files , show them in menu bash 2 answers need in reading value list , writing input next command. i need write shell script needs have git tag -l --- list out tags or version numbers like: v1.0 v2.0 v3.0 v4.0 i need read 1 of value list output say, v3.0 , pass next command read v3.0 git checkout <version number> example: git checkout v3.0 how achieve in shell scripting? pls help reading last comment, think @fedorqui right. question duplicate: build menu , prompt user. in situation should use options=( $(git tag -l) ) . the script @ list options in menu in bash becomes: #!/bin/bash prompt="please select file:" options=( $(git tag -l) ) ps3="$prompt " select opt in "${options[@]}" "quit" ; if (( reply == 1 + ${#options[@]} )) ; exit elif

How to add a customer title in Google+ share link -

as facebook , twitter has parameter url , title. https://www.facebook.com/sharer.php?u=[url]&t=[text] http://twitter.com/intent/tweet?source=sharethiscom&text=[text]&url=[url] what title parameter in google+ share link ? https://plus.google.com/share?url=[url] you can't supply share link - accepts url share , language parameters. can pre-fill text if use share widget though: http://developers.google.com/+/web/share the title of page in snippet taken url being shared. title either based on schema.org markup, open graph tags, or title of page. there's example of setting on snippet doc page: https://developers.google.com/+/web/snippet/

PayPal orders set to status “Suspected Fraud” in Magento -

this question asked before here didn't answer. asking again if there genius across problem , solved me solve. i using paypal payment method in magneto store , it's working perfect placing order status pending after few hours it's status change processing , when shipped order it's status become complete. after few hours of complete status it's become "suspected fraud" , because of issue can not create invoice. so please me solve problem , why problem occur don't know.so please here can let me know reason behind problem , solution. i hope had face problem. thanks in advance. essentially, comes down conversion rates. take @ http://www.hummingbirduk.com/suspected-fraud-transactions-magento/ think it's great walkthrough of this, , offers steps reducing impact , possibly identifying issue in store.

c - I can't input when my structure has integer and character variables -

the following program written in c #include <stdio.h> struct book { char title[80] ; char author[80]; int pages; int datepb; }; struct book input_book(void) { struct book b1; gets(b1.title); gets(b1.author); scanf("%d" , &b1.pages); scanf("%d" , &b1.datepb); return b1; } int main(int argc , char *argv[]) { struct book b1[3]; int i; (i = 0; < 3; ++i) { printf("enter book %d:\n" , + 1); b1[i] = input_book(); printf("\n"); } (i = 0; < 3; ++i) { printf("book %d:\n" , + 1); printf("%s\t%s\t%d\t%d\n" , b1[i].title , b1[i].author , b1[i].pages , b1[i].datepb); printf("\n"); } return 0; } and output get: enter book 1: 5 mistakes aaditua 532 enter book 2: 4 mistakes aaditya enter book 3: 9 mistakes aaditya book 1: 5 mistakes aaditua 581983988 532 book 2: 4

ipython - Hook the global name lookup in a python interpreter -

here thing, have proxy holding reference remote module, , put of these proxies sys.modules such can use local modules. other objects put in __builtin__ module @ remote environment (like magic variable convenience of debugging or referencing). don't want reference these vars conn.__builtin__.var , , have either replace local __builtin__ (which seems not working replace sys.modules['__builtin__'] or hook global name finding rules. how? module can overload getattr this. in interactive interpreter ipython , main module or how this? update: pointed out @nizam mohamed, yes can __main__ module, still can't modify name lookup role of it. i'd turn local environment remote 1 (for debugging console) update for iterate __builtin__.__dict__ , if there name isn't in local __builtin__ . add name local's __builtin__ . it's not dynamic compare name lookup rule if can't find name in local __builtin__ try remote one. here similar discussion.

Listing Creation Control like Google Keep in an Android app -

Image
here link of creating list in google keep app. need list creation control in android. i searching control of creating item listing google keep android. is there third party library? if not, give me idea create control that. irshu mention in comment use staggeredgridlayoutmanager.a layoutmanager lays out children in staggered grid formation. supports horizontal & vertical layout ability layout children in reverse. staggered grids have gaps @ edges of layout. avoid these gaps, staggeredgridlayoutmanager can offset spans independently or move items between spans. for more details visit: http://developer.android.com/reference/android/support/v7/widget/staggeredgridlayoutmanager.html tutorials : http://inducesmile.com/android/android-staggeredgridlayoutmanager-example-tutorial/

Shared database in Lotus Notes with user accounts -

i have easy , generic question lotus notes. want achieve following configuration: multiple users uses 1 database located on notes server. every user has notes client , works on own replica. need have permissions read , edit documents of everyone. users should have access own documents , not documents other users. don't want documents of users replicated local database of everyone. how achieve this? know tutorial basic configuration? thank you! add field of type "readers" , field of type "authors" (both computed when composed) forms in database , set value to: @author : "[admin]" set access "author" users option "create documents" in database's acl. add role "[admin]" in acl , assign yourself. set option "enforce consistent access control list across replicas" in acl make sure users have same right on client on server.

objective c - Swap positions UIImageViews second time Xcode -

i have problem. when use code below, can swap same uiimageviews first time. second time, go original position or overlay each other. example code: if (cgrectintersectsrect(view1.frame, view2.frame)) { [uiview animatewithduration:0.2 animations:^{ cgrect view1frame = view1.frame; view1.frame = view2.frame; view2.frame = view1frame; }]; } how can swap positions of uiimageviews every time? appreciated! did make method? -(void) swaplocwith: (uiview *) view1 and: (uiview *) view2 { //your code sample here } ... -(void) somemethod { //swap once [self swaplocwith: view1 and: view2]; //swap [self swaplocwith: view2 and: view1]; }

php - mod_security and "connection: close" -

we have application needs close connection , redirect page. works fine following code: header("connection: close\r\n"); header("content-encoding: none\r\n"); ignore_user_abort(true); ob_start(); $size = ob_get_length(); //redirect header("location: $domain", true, 303); header("content-length: $size"); ob_end_flush(); flush(); we use mod_security on server, once activated not close connection anymore. audit log not contain entry. disabling mod_security or setting secresponsebodyaccess off re-enable functionality. is there option mod_security or php-way leave secresponsebodyaccess on , still able close connection?

python 2.7 - Beautifulsoup tag.getText() gives blank value -

i extracting st class span using following code: address = "http://www.google.com/search?q=%s&num=50&hl=en&start=0" % (urllib.quote_plus(query)) request = urllib2.request(address, none, {'user-agent':'mosilla/5.0 (macintosh; intel mac os x 10_7_4) applewebkit/536.11 (khtml, gecko) chrome/20.0.1132.57 safari/536.11'}) urlfile = urllib2.urlopen(request) page = urlfile.read() soup = beautifulsoup(page) divg=soup.findall('div',attrs={'class':'g'}) li in divg: try: print "\n\n" print "link :" print li.find('h3').find('a')['href'] print "title " title=(li.find('h3',attrs={'class':'r'})) print title.gettext() print "body" body=(li.find('span',attrs={'class':'st'})) print body.gettext() except: continue print len

reactjs - Blank white screen React & Webpack / Babel has been moved to babel-core -

i'm working through react tutorial , getting blank white screen during setup. blank white screen when run npm start can see blank div when inspect element. i found similar issue here solution doesn't work me i 1 error: node api babel has been moved babel-core. @ multi main i've copied of exact files github files , still i'm getting. i've tried npm uninstall babel -g still gives same error , white screen. here webpack.config.js module.exports = { entry: './main.js', output: { path: './', filename: 'index.js' }, devserver: { inline: true, port: 3333 }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel', query: { presets: ['es2015', 'react'] } } ] } } here package.json { "name": "es6-react-setup", "version": "1.0.0", &

codenameone - back button restriction on the app -

i looking restrict button i.e not anything. found need override in statemachine class. protected boolean allowbackto(string formname) { return false;} on our development deleted class , don't have class. so there way restrict button in total application. thanks in advance you can't delete statemachine class in guibuilder app. if deleted , no longer using guibuilder code no longer relevant anyway , totally unnecessary added manually.

unit testing - angularjs - $httpbackend error: Unexpected request -

i know there plenty of questions this, none of worked me , don't know what's going on , why don't work on specific case. i'm trying test controller using $httpbackend. unfortunately, unexpected request: default-system.json no more request expected the controller i'm trying test loads data using load() method of factory: angular.module('services', ['ngresource']).factory('mydata', [ '$http', '$stateparams', function($http, $stateparams) { var mydata; mydata= function(data) { if (data) { return this.setdata(data); } }; mydata.prototype = { setdata: function(data) { return angular.extend(this, data); }, load: function() { var scope; scope = this; return $http.get('default-system.json').success(function(data) { return scope.setdata(data.data); }).error(function(err) { return console.er

ios - Google Sign In Button Not Connecting To Google Button Outlet Objective C [Pod Installation] -

Image
i have followed procedure same given in developer google google sign in @ last when said connect outlets unfortunately unable so, please guide me. you should have set custom class of uibutton click on uibutton click on show identity inspector set custom class gidsigninbutton

variable assignment - Verilog: Assigning a register to a register -

in below verilog assignment register rotationdoner assigned signal , other register rotationdonerr assigned same register. doesn't mean both registers hold same value , condition never true? input wire rotationdone; // module definition reg rotationdoner; reg rotationdonerr; rotationdoner <= rotationdone; rotationdonerr <= rotationdoner; if ( rotationdoner && (! rotationdonerr ) ) begin interrupttocpu <= 1; end thanks clarification! i assume there procedural block based on edge of clocking event in code. when have non blocking assignments ( <= ), evaluation of rhs takes place in active event region , while lhs updated in nba region . consider following example, non-blocking assignments evaluates rhs in active region , stores value internally , temporarily same time stamp (the older value of a stored internally here). in nba region, lhs updated ( b gets older value of a , a gets value of inp ). // synthesize simple

javascript - 3 row layout, 100% height: 1 auto, 1 auto with scroll, 1 fixed -

i'm struggling create page layout has: header expand match content, footer has fixed height (which never change) , content section fills distance between 2 scroll when necessary. the difference between , many other 3 row questions asked on need header fluid not fixed. here's example of after. works in chrome, 40% of target demographic use ie7 , doesn't work in version of ie. it's worth viewing full page. html, body, form { height: 100%; margin: 0; overflow: hidden; } .table { display: table; width: 100%; height: 100%; } .table .tr { display: table-row; } .table .tr.header { background: #ccc; } .table .tr.content { height: 90%; } .table .tr.footer { height: 50px; background: #ccc; } .table .td { display: table-cell; } .innercontent { height: 100%; background: #f0f0f0; overflow: auto; } <div class="table"> <div class="tr header"> <di