Posts

Showing posts from August, 2013

blogger - how to give admin approval to authors' posts before publish them -

i have blog in www.blogger.com. authors publish articles on blog. publish unwanted content on blog. so, it's better use admin approval before publish articles.i tried solve this,but can't find solution yet. please tell me how give admin approval authors' posts before publish them. currently, not possible. if user author, can create posts without kind of approvals admin. work around use posting using email feature available under settings > email , set option save emails draft post way users can email in new posts , need approved admin before being published.

html - Jquery .find an id of an id -

i struggling below work. can 2 ids using :has not three. want able apply css span_element when has grandchild of disabling_div . jquery $("[id^=span_element]:has[id^=another_id]:has([id^=disablingdiv])").css({ "cursor": "not-allowed" }); or $("[id^=span_element].find([id^=disablingdiv])").css({ "cursor": "not-allowed" }); html <div id="span_element_1"> <!--apply style this, when disablingdiv_1 below--> <div id="another_id"> <div id="disablingdiv_1"> content </div> </div> </div> after reading edit , of comments think search this: $("[id^=disablingdiv]").parent().css(); // that's #another_id $("[id^=disablingdiv]").parent().parent().css(); // that's #span_element_1 that way go bottom > top , don't have verify if #span_element or another_div contains disab

string - bash: changing column fields by current number of occurence/running number -

i got stuck rather simple task (which more frustrating ;-) ): have column this: >foo111_bar37 >foo111_bar38 >foo111_bar40 >foo111_bar40 >foo111_bar41 >foo111_bar42 >foo111_bar49 >foo111_bar49 >foo111_bar49 ... and either modify column or new column, includes current count of same string >foo111_bar37x1 >foo111_bar38x1 >foo111_bar40x1 >foo111_bar40x2 >foo111_bar41x1 >foo111_bar42x1 >foo111_bar49x1 >foo111_bar49x2 >foo111_bar49x3 ... goal line becomes unique , still contains original information. found out how adress column awk , change strings in general (e.g. appending "x1"), not how number-specific changes. people seem want rid of duplicates or count total number of duplicates, not helping me here. btw: i'm using mobaxterm bash environment on windows thanks lot! using awk, have available: $ awk '{a[$1]++;print $1 "x" a[$1]}' file >foo111_bar37x1 >foo111_bar38x1 >

c# - Urlhelper.action encodes some special characters -

i have asp.net core web api. use iurlhelper.action generate qualified url. when pass Østjylland - copy%* it escapes Ø , whitespaces not * %c3%98stjylland%20-%20copy* acording documentation https://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.action(v=vs.118).aspx?f=255&mspperror=-2147217396#anchor_15 no characters should escaped. why happen? have use webutility first decode url urlhelper , encode again webutility escape special characters?

vba - Graphic Quality in PowerPoint graphics export -

i have difficulties exporting graphics in powerpoint images. when export graphic powerpoint manually (rightclick -> save picture) image has better quality when exported using vba: call objpptshape.export(strexportname, ppsaveaspng) can explain why problem occurs? i use workaround save print areas excel worksheet png files. there easier way export high quality pngs excel? thanks in advance. if add parameters after call, should better results: objpptshape.export strexportname, ppsaveaspng, 1000, 1000, pprelativetoslide tweak numbers needed. no need call ( ) - call methods name , no brackets

mongodb - How to query by date using mongo repository in spring boot? -

i have developed application in spring boot mongo reposotory. using spring data jpa. , declared in many tables createddate date util package in java , date stores in db iso formatted. when query using mongo repository findbycreateddate(date date) gives no result. below model class @document public class barmodel extends baseentity { @notnull @size(min = 2, max = 140) string name; string address; string city; string state; string zipcode; string phone; string description; string primimage; @dbref location location; @dbref list<special> specials; } @mappedsuperclass @entitylisteners(auditingentitylistener.class) public abstract class baseentity { @id private string id; @createdby private string createdby = getcurrentauditor(); @createddate @datetimeformat(iso = iso.date_time) private date creationtime = new date(); @createdby @lastmodifiedby private string modifiedby = ge

user interface - matlab set_param function doesn't work in loop -

i have matlab gui code lets draw on axes , passes coordinates constant in simulink. while mouse button held down should draw on axes , send coordinates , when it'not, should send coordinates should not draw. here code: ` function figure1_windowbuttonupfcn(hobject, eventdata, handles) % hobject handle figure1 (see gcbo) % eventdata reserved - defined in future version of matlab % handles structure handles , user data (see guidata) global bool; bool=false; set(handles.figure1,'windowbuttonmotionfcn',@(hobject,eventdata)figure1_windowbuttonmotionfcn(hobject,eventdata,guidata(hobject))); %set windownbuttonmotionfcn in order make work again function figure1_windowbuttondownfcn(hobject, eventdata, handles) set(handles.figure1,'windowbuttonmotionfcn',@empty); %change windowbuttonmotionfcn in order not let work global bool; bool=true; global lastx; global lasty; x=0; while bool coord=get(handles

Trying to add item to linq select statement in c# -

i have long result set in linq put in ratestest, mapping result chargeelementsnullable. issue doesnt include fee record is var fees = (from r in _dbcontext.rates r.ratetypefk == ratetype.fee && (r.localebw & localeid) > 0 && (r.policybw & policy.bitwise) > 0 && r.rateexclude == 0 select r); so want add fees ratestest , mapping again can use add method, dont want long winded mapping 1 record.. trying add ratestest directly instead.. no joy... tried using defaultifempty expecting left join.. fee still wasnt in there.. var ratestest = (from qi in quoteinputs join r in _dbcontext.rates on qi.ratepk equals r.ratepk join fee in fees on r.ratepk equals fee.ratepk feecontainer fee in feecontainer.defaultifempty() join c in _dbcontext.covers on r.covercalcfk equals c.coverpk covers

angularjs - How to Calculate Date as per Item Shown in dropdown in Ionic2 -

Image
i beginner in ionic 2. want calculate date per item shown in dropdown in hybrid ionic application. i have 2 dropdown in page: first dropdown list second dropdown i want, after select on last 7 days , click on **block button ** last 7 days date calculated current date, same last 1 months , last 12 months , pass days url displaying data in piecharts , bar charts this home.ts code import { component } '@angular/core'; import { navcontroller } 'ionic-angular'; import { chartpage } '../chart/chart'; import moment 'moment'; var s,p; @component({ selector: 'page-home', templateurl: 'home.html' }) export class homepage { public states: any[]; public districts: any[]; public cities: any[]; public selecteddistricts: any[]; public selectedcities: any[]; public sstate: any; public sdistrict: any; appname = 'dropdown app'; constructor(public navcontroller: navcontroller) {

PHP Codeigniter REST Api limit not working -

i have similar issue this one since no 1 answered reposting question, dont see errors or limits not working, tried debug rest_controller, problem on line 695 // doing key related stuff? can if have key right? if ($this->config->item('rest_enable_keys') && empty($this->rest->key) === false) { // check limit if ($this->config->item('rest_enable_limits') && $this->_check_limit($controller_method) === false) { $response = [$this->config->item('rest_status_field_name') => false, $this->config->item('rest_message_field_name') => $this->lang->line('text_rest_api_key_time_limit')]; $this->response($response, self::http_unauthorized); } // if no level set use 0, aren't using permissions $level = isset($this->methods[$controller_method]['level']) ? $this->methods[$controller_method]['l

java - Selenium Grid console doesn't open with IDEA but works with Eclipse -

for background please refer original question selenium grid console doesn't open selenium hub started programmatically i'm new idea shifted eclipse. i've got latest version of java sdk , removed older version. also made sure idea points current version of jdk. any reason what's wrong idea prevents opening selenium grid console ? note ( wrt idea ): during programme execution ( in debug mode ) grid console url keeps on loading, when stop debug mode, loads though is bug idea ?

amazon web services - Android AWS RekognitionClient error -

i trying use amazon web services recognition in android problem rekognitionclient. try initialize it, error: no instance field endpointprefix of type ljava/lang/string; in class lcom/amazonaws/services/rekognition/amazonrekognitionclient; or superclasses (declaration of 'com.amazonaws.services.rekognition.amazonrekognitionclient' appears in /data/app/com.amazonaws.husebnerbot-2/base.apk) i have tried can not find error. can me? private void initializerekognitionsdk() { log.d(tag, "rekognition client"); cognitocredentialsprovider credentialsprovider = new cognitocachingcredentialsprovider( getapplicationcontext(), appcontext.getresources().getstring(r.string.identity_id_test), regions.fromname("us-east-1") ); amazonrekognitionclient = new amazonrekognitionclient(credentialsprovider); } thank you!

unity3d - Unity VR World Space Canvas UI and objects overlapping -

Image
i'm having problem in vr application. made menu in canvas (world-space canvas) , attached main camera (the 1 need). the problem menu (the canvas) 1 meter ahead of main camera crashing rest of elements of scene (walls, etc.), when these walls/other elements closer menu camera. i'm trying find out way assign kind of precedence canvas menu avoid overlapping , show whole menu always.

html - Browser converts empty span tag to self-closed -

i using <span class="class-name"></span> repeatedly in project. this: ... <span class="class-name"></span> text generated here <span class="class-name"></span> text generated here <span class="class-name"></span> ... the purpose of <span> is have padding-right text after displayed nicer. problem chrome browser can not render empty <span> converts this: <span class="class-name"> text generated here <span class="class-name"> text generated here <span class="class-name"> </span> </span> </span> which not result in output looking for. because paddings mixed up. interesting thing if add character ​ between tags, first view rendered browser , problem gone. please explain why working this? had trouble reproducing bug, code seems produce it <span class=&

csv - Exception on mapper while running mapper as python code -

i processing big csv file in hadoop containing 700 000 records total. have divided 7 files, 100k records each. i got error in container: pipemapred.waitoutputthreads(): subprocess failed code 143 i know space issue don't know how resolve or handle.

google bigquery - Discrepancy when using group by clause -

i see discrepancy in count because of group clause, please advise how go this. total records in table 4638 when count(you_id), when run script i'm getting 4544 records. select thumbnails, cr1, monetize, c_id, you_id, vendor, ratio * 100 percent ( select thumbnails, c_id,you_id, vendor,cr1,monetize,timestamp, count(*) total, ratio_to_report(total) over() ratio testing group 1,2,3,4,5,6,7 );

docker - How to use whitelisting per container -

i'm using traefik in docker-mode. it's retrieving config (acme.domains, enabled, frontend-rules,...) docker containers. currently containers reachable www (0.0.0.0). i'm wondering how restrict access single container dedicated ip-addresses. the docker labels of private web-service like: labels: - "traefik.enable=true" - "traefik.backend='private container'" - "traefik.whitelistsourcerange=192.168.1.0/24" the whitelisted ip in case of course example. private ip-subnet. maybe it's possible set frontend-rule bases on "client.ip"? thanks help!

php - FB Graph Api story-attachment-media get album -

it possible album story-attachment-media object? a: https://graph.facebook.com/v2.9/object?fields=photos{webp_images} or: https://graph.facebook.com/v2.9/object?fields=album{photos{webp_images}} or: https://graph.facebook.com/v2.9/object?fields=albums.limit(1){photos{webp_images}} [from comments] have posted on facebook page link outside page. [...] more photos sizes albums does, not full_picture i don't think provide many sizes external objects, thumbnail find inside attachments, full_picture, , picture.

dotnetactivity - The blob supplied is not valid when deploying data factory pipeline with custom .net activity -

i've been getting "useful" error message when deploying experimental data factory pipeline has dotnetactivity within it. entity provisioning failed: blob supplied not valid. blob: customactivity/package.zip. error code: . error message: . i've been reading trouble shooting tips , double checking connection strings, no avail. after double checking in particular blob storage connection strings, able resolve copying connection string azure portal -> storage account -> access keys azure storage linked service settings. i can theorize there subtlety in connection string format results in poor error message pipeline provisioning. interestingly, can put wrong access key storage account linked service, redeploy along the pipeline , doesn't complain provisioning. perhaps there additional checks done on first provision.

machine learning - keras-The simple auoencoder seems not working in the official blog -

i write code following instrucions in building autoencoders in keras . implement first example, i.e. simplest autoencoder, seems not working. decoded images same. secode example in blog fine. here jupyter notebook code , output is. could give me tips? advance.

javascript - Set an interval for every 12 hours -

i need function run , rerun @ 12pm , 12am. i'm using vuejs if has influence. fetch_datetime() { axios.get('/api/core/datetime').then((response) => { this.datetime = response.data; this.set_interval(); }); }, set_interval() { var current_date = new date(); var hours = current_date.gethours(); var minutes = current_date.getminutes(); var seconds = current_date.getseconds(); if(hours == 12 && minutes == 0 && seconds == 0 || hours == 0 && minutes == 0 && seconds == 0) { this.fetch_datetime(); } else { if(hours >= 12) { settimeout(this.fetch_datetime, (1000 * (60 - seconds) * (60 - minutes)) + (1000 * 60 * (24 - hours - 1) * 60)); } else { settimeout(this.fetch_datetime, (1000 * (60 - seconds) * (60 - minutes)) + (1000 * 60 * (12 - hours - 1) * 60)); } } however isn't working expected , function run

python 2.7 - write.format adding extra quotes while writing to a tab delimited hdfs file in pyspark -

i have dataframe in pyspark, schema , value below- schema- |-- c1: string (nullable = true) |-- c2: string (nullable = true) |-- c3: string (nullable = true) |-- c4: string (nullable = true) data- |c1|c2|c3|c4| +--+--+--+---- |78|93| |10| |12|97| |20| |23|93| |10| |78|93| |40| my column c3 column 3 spaces. (to more sure checked length of column , came 3) now when try write dataframe tab delimited file in hdfs data comes out - 78 93 " " 10 12 97 " " 20 23 93 " " 10 78 93 " " 40 that quotes coming column c3. used below command write dataframe: outp.write.format('csv').option("delimiter","\t").option("quotemode",none).save(path="path.txt") i tried solution find none helped. want write column c3 3 spaces only, since dealing fixed length file cannot increase or decrease length of column. please i

android - Google emoji Issue -

hi guys working on chat application. , have implement emoji in android app. there web app , have chat web app also. , use google noto emoji have use in android app also.i getting emoji server side this d/messagerecived: know queries 1. how show in textview .as link of emoji on server. 2. how send emoji web app can read . 3. how use google noto imoji in android app. i not able post code because don't have idea. how handle this?

php - update over odbc with prepared statements on filemaker -

i trying update string on odbc on filemaker-server contains special characters é, á etc. have use prepare statements. don´t have error logfile writing numeric 1:update:1 $conn = odbc_connect("dsn=server;database=test;uid=odbc;pwd=1234", "odbc", "1234"); $result = odbc_exec($conn, "select id, mh_data mytable mh_data '1,%'"); while ($row = odbc_fetch_array($result)){ $id = $row["id"]; $mh_data = $row["mh_data"]; $arr = explode(",", $mh_data); $arrcount = count($arr); if ($arrcount == 2){ $mh_data = preg_replace("/1, /", "1 ", $mh_data, 1); $mh_data_neu = trim($mh_data); // update $query = 'update mytable set mh_data=? id=?'; $stmt = odbc_prepare ($conn, $query); $success = odbc_execute($stmt, array($mh_data_neu, $id)); fwrite($flog, "\nupdate:" . $success);

css - Different 'from' position after first animation iteration -

https://jsfiddle.net/hk9qsayn/ <div class="wrapper"> <div class="animate"></div> </div> .wrapper { width: 600px; height:50px; position: relative; background-color: #fff; overflow: hidden; } .animate { width: 50px; height: 50px; position: absolute; background-color: red; animation: wind 2s linear infinite; } @keyframes wind { 0% {right:30%} 100% {right:120%} } i want start first iteration right:30% , second , other iteration should start right:-100px . i've tried use animations didn't work. [edit: forgot - for second start-position] you use multiple animations: .wrapper { width: 600px; height:50px; position: relative; background-color: #fff; overflow: hidden; } .animate { width: 50px; height: 50px; position: absolute; background-color: red; //right:-100px; animation: wind 2s linear, 2s blub 2s linear infinite; } @keyframes wind { 0%

java - JLabel setLocation not working? -

here code have written: super("add contact"); setlayout(new flowlayout()); ipaddress = new jlabel("ip address"); ipaddress.setlocation(1000, 100); imageicon ii=new imageicon(getclass().getresource("add.png")); jlabel image = new jlabel(ii); image.setsize(100, 100); image.setlocation(500, 100); add(image); add(ipaddress); setsize(500,150); } that correct. layout manager responsible setting location of component based on rules of layout manager. in case flowlayout override location of component. you should never hardcode location of component. if using resolution less 1024 x 768? component never show. you should never set size of component. every component has preferred size. in case of label image, preferred size size of image. read on layout managers , use appropriate layout manager or combination of layout managers achieve desired layout.

html - Stacking fa-circle-o and other icons whilst maintaining vertical and horizontal alignment -

i'm attempting stack 2 icons. attempt looks awful, because central icon isn't centred within fa-circle-o . <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> <span class="fa-stack fa-lg"> <i class="fa fa-th-large fa-stack-1x"></i> <i class="fa fa-circle-o fa-stack-2x"></i> </span> is there nice way resolve within stacking system provided font awesome? as far know, can't solve using font-awesome classes, can simple styling applying margin-top: 1px <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> <span class="fa-stack fa-lg"> <i class="fa fa-th-large fa-fw fa-stack-1x" style="margin-top: 1px"></i> <i class="fa fa-circle-o fa-fw fa

python - setting celery queues in django: unable to specify queues in settings.py -

i have following settings in django project's settings.py : celery_broker_url = get_redis_url_with_db(1) celery_accept_content = ['json', 'pickle'] celery_task_serializer = 'pickle' celery_result_serializer = 'pickle' celery_beat_schedule = { 'repush-countries-to-outs': { 'task': 'data.tasks.repush_countries_to_outs', 'schedule': timedelta(minutes=10), } } and works expected. but when add queue configuration: celery_routes = { 'data.tasks.retry_fetching_out': { 'queue': 'fetch_outs' } } and restart celery -q fetch_outs setting, task retry_fetching_out ignored workers. however, when put same configutation in celery object so: app = celery('sourcery') app.config_from_object('django.conf:settings', namespace='celery') app.conf.task_routes = { 'data.tasks.retry_fetching_out': { 'queue':

jquery - JavaScript in embedded forms -

let's have entity user . the user can have many address . in address there's 2 fields : country state what want : when user create account, can add many address wants. when user select country, populate state field based on country. what i've done : usertype : /** * @param formbuilderinterface $builder * @param array $options */ public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('address', 'collection', array( 'type' => new addresstype(), 'allow_add' => true, 'allow_delete' => true)) //... } the javascript add address (which working : based on symfony doc): <script type="text/javascript"> $(document).ready(function() { var $container = $('div#mybundle_user_address'); var $addlink = $('<a href="#" id="add_source" class=""

Batch script starting javafx bundled application shows no output -

i have simple batch script file line: echo "welcome script" start "title of program" /wait /b "c:\program files (x86)\path_to_my_program\myprogram.exe" %1 %2 %3 %4 %5 the script receives several arguments (up five) , passes them application. application actions on params , stores them in file. everything working well, except output in application made system.out.println() not shown in windows command dock. application self-packaged javafx bundle. please advice appreciated. p.s. can see output produced script ( echo ). can't see output within application neither form stdout neither logback.

tensorflow - generator called at the wrong time (keras) -

i use fit_generator() in keras 2.0.2 batch size 10 , steps 320 because have 3209 samples training. before first epoch begins, generator called 11 times, showing: train -- ind: 0 10 ... train -- ind: 100 110 then, after first batch (1/320), prints out train -- ind: 110 120 , think should train -- ind: 0 10 . implementation train_generator() function incorrect? or why having issue? here code generator: epoch = 10 x_train_img = img[:train_size] # shape: (3209,512,512) x_test_img = img[train_size:] # shape: (357,512,512) def train_generator(): global x_train_img last_ind = 0 while 1: x_train = x_train_img[last_ind:last_ind+batch_size] print('train -- ind: ',last_ind," ",last_ind+batch_size) last_ind = last_ind+batch_size x_train = x_train.astype('float32') / 255. x_train = np.reshape(x_train, (len(x_train), 512, 512, 1)) yield (x_train, x_train) if last_ind >= x_train

javafx - java.io.IOException: Short read of DER length -

i'm trying create java application can read x509 certificates informations , display them in tableview . but i've problem when i'm trying display informations code below @fxml private void handlehdd() throws certificateexception, ioexception{ string userdir = system.getproperty("user.home"); file folder = new file(userdir +"\\desktop\\certificate_folder"); file[] certificates = folder.listfiles(); if (certificates!=null){ string columnheader[] = {"nom","version","n°série","algorithme de signature","emetteur","valide à partir de","valide jusqu'au","objet","clé publique"}; int sizecolumns = 9; (file file : certificates){ if(file.isfile()){ certificatefactory cf = certificatefactory.getinstance("x.509"); inputstream input = new fileinputstream(file); x509ce

python - Datetime object won't work with weekday() -

class event(models.model): day = models.datefield(blank=true, null=true) period = models.integerfield(choices=period_choices) cart = models.charfield(choices=cart_choice, max_length=4) is_reserved = models.booleanfield(default=false) teacher = models.foreignkey(user, blank=true, null=true) class reservationform(modelform): class meta: model = event fields = ('day', 'teacher', 'is_reserved', 'period', 'cart') widgets = {'teacher': forms.hiddeninput(), 'is_reserved': forms.hiddeninput(), 'period': forms.hiddeninput(), 'cart': forms.hiddeninput(), 'day': forms.hiddeninput()} i want day of week in order sort events. should able using django's date filter - {% field.initial.day|day:"w" %} - doesn't return anything. so wrote template tag: @register.filter def the_day(value): return value.date().weekday() home.htm

android - Mocked method not returning value from test-local variable -

i have written test check if method adding , subtracting coins userdata preference method working correctly. mocked sharedpreferences class , using local variable coins stores coin amount. however mocked getint() not seem return correct value of coins: running test addcoinvalid fails (expected: 5, actual: 0). i've made 2 outputs during test: variable: 1 - mockedreturn: 0 variable: 5 - mockedreturn: 0 the left number value variable , right number mocked getint() returns. can tell me what's going on? :o this test: class userdatatest { var coins = 0 val editor = mock<sharedpreferences.editor>() val sharedprefs = mock<sharedpreferences> { on{ getint("coins", 0) } doreturn coins on { edit() } doreturn editor } val context = mock<context> { on { getsharedpreferences("userdata", 0) } doreturn sharedprefs } val userdata = userdata(context) @before fun initeditormock

Downloading Rust crates using a web browser -

is there way download rust dependencies using web browser? have internet access through web browser not through command prompt (windows). i know can set local fileserver , set cargo use mirror , doesn't if can't crates in first place. edit: see related github issue , closed. you can use following address: https://crates.io/api/v1/crates/name/version/download to download crates directly crates.io - change name , version download specific version of crate. the downloaded file has .crate extension, it's tarball (.tar.gz).

kubernetes - Can't Access Services Outside Cluster Network (LXD installation) -

i've installed kubernetes on lxd fine can't public ip's services. i've tried loadbalancing (i know doesn't quite work lxd) , ingress no avail. kubectl events shows : nginx-ingress-controller error: operation cannot fulfilled on ingresses.extensions "graylog-ing2": object has been modified; please apply changes latest version , try again kubectl ing shows ingress service has no external ip. has using kubernetes on lxd exposed apps outside network? thanks help.

binaryfiles - It's possible to create an executable binary from a RHEL6 .RPM file and dependences? -

there red hat el06 server on need "install" package not part of official repository. far good, i'd download .rpm file manually, i'd satisfy dependencies , i'd install. problem not have access root , administrator not install packages not official. however, if have binary execution permission in home dir, able execute , need met. so ask, possible generate directory containing dependencies of libs + binary executable, starting rpm file? how do this?

python - Pandas DataFrame.to_excel How to ignore Formula -

first of looked on doc , on stackoverflow , google. did not find helps me decided post question, if miss had same problem, apologize. this problem, have df named parameters : attribute clause value 0 distinguishedname (.)*=_fr,dc=hld, dc=net 1 institution_label == fakecompanyname inc. 2 employee_type == 1 3 email not (.)*.deleted and use pandas function to_excel write in xlsx file. creates file replaces == 0 in xlsx file because think detects string excel formula. know if possible ignore ? to fix problem, add ' before == excel doesn't transform it. it's works. have '== in excel file instead of 0, want == does know better way ignore formula without having change value of dataframe's cell please ? here's code : writer = pd.excelwriter("exportations\\ddlcard_"+ddlname+".xlsx") #replace == '== parameters["clause"] = parameters

anomaly detection - How to load "Amazon product co-purchasing network dataset" in MATLAB? -

i'm trying load dataset named "amazon product co-purchasing network" being processed in matlab, , article i'm trying implement follows: embedding approach anomaly detection the problem dataset big , matlab runs out of memory! there can guide me such problem? thanks lot ...

android - Change background and textcolor in cardview on touch -

Image
i having difficulty in changing text color background color on touch (hover effect) in cardview. have changed background color not text color. i have tried use selector didn't worked out. <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:drawable="@android:color/white" /> <item android:drawable="@android:color/black"/> </selector> it changes color of text , background my layout on pressing want change color text background here layoutcode <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/main" android:layout_width="match_parent" andro

Server Side Code To Save File From HTML5 File Input -

i'm lost in writing server side code save file html5 file input. have seen examples in php cannot use due ict restrictions , have working example in aspx, post file existing asmx web service, cannot figure out how write server side code. have been struggling on week. i'm thinking trying post html5 form data aspx page , upload way, don't think that's best solution. have thoughts on efficient route upload file server isn't php or aspx? <div id="filearea" class="row desc"> <div class="col-xs-12"> <form id="uploadform" class="form-inline" action=javascript:uploadfile() method="post" enctype="multipart/form-data"> <div class="form-group"> <input type="file" class="form-control" id="filetoupload&q

java - Import Accumulo Libraries in Scala SBT project -

Image
i want know about, using accumulo or other java libraries in sbt projects. i used intellij automatically import libraries, , imported getting errors in intellij , @ runtime/project build like:- cannot resolve _ . in import org.apache.accumulo.core.client.__ i used these steps include:- file > project structure > libraries(in left pan) > clicked + icon located @ top left in middle pan > selected maven > searched accumulo , selected org.apache.accumulo.core. when maven dependencies in maven central gives syntax adding dependencies in several build tools - including sbt instance if apache accumulo core you'd see sbt usage : librarydependencies += "org.apache.accumulo" % "accumulo-core" % "1.8.1"

ldap - Gitlab Active Directory configuration issue -

i've installed gitlab on centos. want configure ldap authentication. in gitlab.rb wrote configurations, made 'reconfigure' , 'ldap:check:gitlab'. finished successfully. however in gitlab while login says 'invalid credentials'. my credentials correct, checked authentication ldap via php. does have suggestions?

c# - How to generate WOPI Access Token from WAC Office Server -

Image
one of our customers want open word documents using office server. installed wac server on-premise open office documents in browser. this document opened in iframe in our system. generate access token wac server using wopi api. did investigation, , found sharepoint doing that. can use httpclient in c# extract value. looks dirty! , i'm sure there better way generate access token? i'm totally new sharepoint , wac server. please help. there wopi api documentation. i'm still confused how build request? check image taken documentation. thank in advance :) you don't need implement /wopibootstrapper endpoint nor getnewaccesstoken method. they're specific office online (365) integration program . your job generate access_token included in post request of wopi frame in application (similarly picture in question). this token used wopi client (wac/owa/oos server). wopi client doesn't need able decipher token or understand in other way. take

python 2.7 - How to get a data from form in django? -

i have form in template django ok, saves ok in model. well, now, want create new form inside form. form, create inside template, now, want de data save in model. (i can't use formset, i'm ready using it). form create javascript when user click in option inside list. i'm using class-based view create view. my question is, how can data form created dynamically user? <div class="form-group"> <label class="col-sm-2 control-label">{{form.name.label}}</label> <div class="col-sm-10"> {{form.name}} {% if form.name.errors %} <span class="glyphicon glyphicon-remove form-control-feedback"></span> <span class="help-block">{{form.name.errors.as_text}}</span> {% endif %} </div> <label class="col-sm-2 control-label">{{form.date_max.label}}</label> <div cla

replicate curl command python 3 urllib request API -

this problem kind of driving me crazy. i'm doing simple python 3 script manage api in public website. able curl, not in pyhton. can't use either requests library or curl in real environment, tests this working: curl -d "credential_0=xxxx&credential_1=xxxxxx" -c cookiefile.txt https://xxxxxxxxxxxxxxx/login curl -d 'json={"devices" : ["00:1a:1e:29:73:b2","00:1a:1e:29:73:b2"]}' -b cookiefile.txt -v https://xxxxxxxxx/api-path --trace-ascii /dev/stdout and can see in curl debug: send header, 298 bytes (0x12a) 0000: post /api-path http/1.1 0034: host: xxxxxxxxxxxxxxxx 0056: user-agent: curl/7.47.0 006f: accept: / 007c: cookie: csrf_token=751b6bd9-0290-496b-820e-xxxxxxxx; session 00bc: =xxxxxx-6d29-4cf9-8907-xxxxxxxxxxxx 00e3: content-length: 60 00f7: content-type: application/x-www-form-urlencoded 0128: => send data, 60 bytes (0x3c) 0000: json={"devices" : ["00:1a:1e:29:73:b2",

xpath - How to fetch data by id from parent's sibling element in JasperReports report items list (xml datasource) -

i want create list of order items; each item, want display "item id" , "address line" field; data of former field comes child element on item, data latter must fetched sibling of item's parent using unique id referenced in item. i've created simplified xml data source , report in in order illustrate problem. xml data defined follows: <data> <productorder> <item> <id>10001</id> <installationaddressid>1</installationaddressid> </item> <item> <id>10002</id> <installationaddressid>3</installationaddressid> </item> </productorder> <address> <id>1</id> <addressline>street 1, 12345 berlin germany</addressline> </address> <address> <id>2</id> <addressline>street 2, 12345 berlin germany</addressline> </address> <address> <id

javascript - How to add plugins to website from GitHub? -

i'm looking add plugins, circletype.js , lettering.js specifically, codepen project , i'm not sure how proceed. i've come across before situation before, find great plugin use, , installation documented "download github". repo on github missing actual steps install. i've tried googling this, search results not related, such installing wordpress plugins. there must standard way install plugins websites, can't seem find on adding plugin github website or codepen project. any appreciated. thank :) you can request files text raw.githubusercontent.com available @ raw option @ repositories https://raw.githubusercontent.com/peterhry/circletype/master/js/circletype.js https://raw.githubusercontent.com/davatron5000/lettering.js/master/jquery.lettering.js then create <script> elements, set .textcontent of <script> element text response, append script document . fetch("/path/to/raw/file") .then(response => r

python - What would be the most optimised way to access values in a nested array whilst respecting pep8? -

i have been using nested arrays parsed json. ends giving gigantic line each time try access values in data. let's have nested array in var data, when try reach deeper values, still have respect 80 characters limit. want read or modify value. self.data["name1"]["name2"][varwithnumber][varwithnumber2][varwithnumber3] now, thought 2 possible solutions use: 1- split using temporary vars , reasign data once done ex: tempdata=self.data["name1"]["name2"][varwithnumber] tempdata[varwithnumber2][varwithnumber3]+=1 self.data["name1"]["name2"][varwithnumber]=tempdata i guess solution use quite bit of ressources memory copied around. 2- use exec function implemented in python , split string on multiple lines: exec ('self.data'+ '["name1"]'+ '["name2"]'+ '[varwithnumber]'+ '[varwithnumber2]'+ '[varwithnumber3]+=1') i ha

sql server - How to select Columns using parameters in report builder -

in report builder can select columns using parameters. example : select @field, column2, column3 table_name where @field parameter. also there way this: select @field, column2, sum(column3) on (partition @field) table_name this can done using dynamic sql: create procedure columnreturn @columnname nvarchar(100) declare @sql nvarchar(max) set @sql = 'select [' + @columnname + '] [mytable]' exec (@sql) exec columnreturn 'mycolumn'

javascript - PHP and JS - upload picture not showing -

(i 1 day old php please pardon if repeated) have code upload images uploads/ directory in website folder. done through index.html , upload.php given below , seen php - upload picture , display on page . however, not able display pictures on html page required. redirects upload.php no imageholder there. how that? index.html works fine guessing php settings should fine. followed this , this , this install , setup everything. index.html <!doctype html> <html> <head> <script language= "javascript" type="text/javascript"> function juploadstop(result){ console.log(typeof result); if(result==0){ $(".imageholder").html(""); } else if(result!=0){ $(".imageholder").html("<img src='"+result+"'>"); } } </script> </head> <body> <form action="upload.php" method="post" enctype="multipart/form-data&q