Posts

Showing posts from June, 2014

ios - Presenting transparent view controller over another -

Image
i trying present view controller on one, upper transparent , , bottom have blur effect. what happened see black background in presented view, although clear colour. i have read here, , did same : display clearcolor uiviewcontroller on uiviewcontroller //to present pillview *pillv=[[pillview alloc]initwithpill:pill withnum:num]; pillv.delegate=self; uivisualeffect *blureffect; blureffect = [uiblureffect effectwithstyle:uiblureffectstylelight]; uivisualeffectview *visualeffectview; visualeffectview = [[uivisualeffectview alloc] initwitheffect:blureffect]; visualeffectview.frame=cgrectmake(0, 0, self.view.frame.size.width, [globals sharedglobals].titleheight*self.view.frame.size.height); [self.view addsubview:visualeffectview]; self.modalpresentationstyle = uimodalpresentationcurrentcontext; [self presentviewcontroller:pillv animated:no completion:nil]; you need add uivisualeffectview presented view controller, , not 1 do

javascript - navbar fixed Position offset scroll and smooth scroll -

i'm having problem, have 2 js scripts doesn't work together. the first 1 makes "scroll id" offset matches height of fixed navbar on top of browser. the second 1 making scroll smooth travels, doesn't instantly go target id. problem can't merge them together. scroll offset: $(document).ready(function () { $(".first-scroller").on('click', 'a', function (event) { event.preventdefault(); var o = $($(this).attr("href")).offset(); var st = o.top - $("#fixedbar").outerheight(true); window.scrollto(0, st); }); }); smooth scroll: $('a[href*=#]:not([href=#])').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');

google analytics - Website monthly visits are (daily visits x 30)? -

i'm trying estimate if showing ads on website can become main source of income estimating traffic of similar sites. there several websites, offering traffic statistics , presenting similar data. instance, here statistics stackoverflow.com : http://www.similarweb.com/website/stackoverflow.com http://www.trafficestimate.com/stackoverflow.com http://www.siteworthtraffic.com/report/stackoverflow.com according these data, stackoverflow.com receives around 150 million monthly visits. mean should divide number 30 in order number of daily visits, resulting in 5 million visits day, worth ~15 000$ income day? because that's quite low number such monster. or in reality receives around 150 million users each day, making around 500 000$ day? another case - vk.com : http://www.trafficestimate.com/vk.com http://www.similarweb.com/website/vk.com#overview http://www.siteworthtraffic.com/report/vk.com according vk.com have 350 millions active users. data, presented tr

angularjs - Replace state on Ionic link click -

i'm using ionic , have template code this: <ion-item ng-repeat="model in models" href="#/app/ctrl/{{model.id}}"> {{model.name}} </ion-item> when click link, state changed view. fine. but how replace current view new 1 without keeping on history? i have following code, works in controller: $ionichistory.currentview($ionichistory.backview()); $state.go('app.products', {location: 'replace'}); but don't know how achive same clicking on link. according this docs site can try this: <ion-item ng-repeat="model in models" ui-sref="name.of.state" ui-sref-opts="{location: 'replace'}"> {{model.name}} </ion-item>

Why "string" == ["string"] is true in JavaScript? -

i needed iterate thought object , i'm losing mind this. var obj = { a:"here", b: ["here"]}; for(var o in obj){ alert(obj[o]=="here"); } the == operator compare equality after doing necessary type conversions. === operator not conversion, if 2 values not same type === return false. it's case === faster, , may return different result ==. in other cases performance same. it should using === instead of ==: var obj = { a:"here", b: ["here"]}; for(var o in obj){ alert(obj[o]==="here"); }

ios - Rotation support in custom transitions - Constraints or update frame on rotation? -

Image
i creating 'semi-modal' transition displays content bottom of screen not fill whole screen. the height of modal dependent on preferred content size of toviewcontroller (if preferred size larger container view capped @ height). this working expected until comes rotation. the current transition works using frames device rotated semimodal view displayed positioned incorrectly (see screenshots). it seems default containerview (part of transitioncontext) has w+h auto resizing mask. toviewcontroller has w+h. what want transition height fixed, width flexible , ‘pinned’ bottom of container view. this can achieved using constrains in transition e.g // in animatetransition: uiview *toview = toviewcontroller.view; toview.translatesautoresizingmaskintoconstraints = no; // should transition altering this? [containerview addsubview:toview]; [containerview addconstraints:[nslayoutconstraint constraintswithvisualformat:@"h:|-0-[toview]-0-|" options:nslayoutforma

python - Create a loop to change ints in a list to another int? -

how take list of numbers numlist = [] while len(numlist) <= 1000: numlist.append(1) while len(numlist) <= 1000: numlist.append(0) print(numlist) now how go changing 0? a loop? you're not changing first set of elements add. see comment added code: numlist = [] while len(numlist) <= 1000: numlist.append(1) # numlist thousand elements long, while loop # body never executed. while len(numlist) <= 1000: numlist.append(0) try instead: numlist = [] while len(numlist) <= 1000: numlist.append(1) in range(0, 1000): numlist[i] = 0 print(numlist)

Spring Boot Integration Test - Maven Tests missing JSTL -

i trying implement integration test using selenium our application. idea load applicationcontext of our springmvc project, start embedded tomcat container , run integration tests on it, before shutting down , finalizing applications compilation. now running junit test out of eclipse starts server spring boot perfectly, when running maven tests , accessing website (through selenium or not), following exception: org.apache.jasper.jasperexception: absolute uri: http://java.sun.com/jsp/jstl/core cannot resolved in either web.xml or jar files deployed application however, jstl on classpath scope test in maven. know, why happening? my configuration split on parent project, internal library used in our projects , 1 actual project. omitted uninteresting parts of pom.xml: <properties> <apache.tiles.version>3.0.4</apache.tiles.version> <tomcat.version>7.0.59</tomcat.version> </properties> <dependency> <groupid>javax.serv

jsf - How to set converter properties for each row of a datatable? -

i have created custom iso date time converter : public class isodatetimeconverter implements converter, stateholder { private class type; private string pattern; private boolean transientvalue = false; public void settype(class type) { this.type = type; } public void setpattern(string pattern) { this.pattern = pattern; } @override public object getasobject(facescontext context, uicomponent component, string value) throws converterexception { if (stringcheck.isnullorempty(value)) { throw new converterexception("value not specified"); } try { if (isodate.class.equals(type)) { if (webconst.iso_date_none.equals(value)) { return isodate.dummy; } else { //todo user spezifische timezone auslesen return new isodate(value, timezone.getdefault().getid()); }

Generating matches for URL strings in elasticsearch -

i've been trying come right combination of tokenizers/token filters , analyzers leverage elasticsearch match urls. unfortunately, seems every approach i've taken far misses 1 or 2 edge cases. i'm hoping out there can perhaps shed light on following: if have following values stored in elasticsearch: http://www.example111.com http://www.example111.com/cats http://www.example111.com/cats?type=tabby http://www.example111.com/cats/dogs http://www.example111.com/dogs/cats http://www.example222.com/cats http://www.example222.com http://www.example222.com/cats/dogs http://www.example333.com/fish i'm wondering query use generate following search string , result set combinations (ordered relevance score): http://www.example111.com/cats/dogs [4,2,3,1] http://www.example111.com/cats?type=birman [2,1] http://www.example111.com/dogs [1] http://www.example222.com/cats [6,7] http://www.example333.com [] the general idea being expressed here results

Use indexOf for 2D array in java -

hello create 2d array , want find position first 2 in array. , after add index in new arraylist. code doesn't work. idea problem? import java.util.arraylist; class test { public static void main(string[] args) { arraylist<integer> tableau = new arraylist<integer>(); int[][] tab = { {1,1,1,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,1,1,1}, {1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1}, }; (int = 0; < tab.length; i++) { int j = tab[i].indexof(2); (int k = j ; k < tab[i].length; k++) { if (tab[i][j] == 2){ tableau.add(j); } } } (integer row : tableau) { system.out.println("row = "+ arrays.tostring(tableau)); } } } as others have mentioned, regular arrays not have indexof method, meaning error when compile. however, can create

ios9 - build getting error with ios 9 version. libc++abi.dylib terminating with uncaught exception of type NSException (lldb) -

i getting following error while building app on ios 9 devices.. no issues older version ios. . anyway fix issue . see error details end of application launch' *** first throw call stack: (0x183fc8f5c 0x198bbff80 0x183fc8e2c 0x184eb7f3c 0x1897c0688 0x1897bd2e4 0x18dd0f7ec 0x18dd0fb6c 0x183f805a4 0x183f80038 0x183f7dd38 0x183eacdc0 0x18958c0ac 0x189586f44 0x10007b154 0x1993ea8b8) libc++abi.dylib: terminating uncaught exception of type nsexception (lldb) #import <uikit/uikit.h> int main(int argc, char *argv[]) { nsautoreleasepool * pool = [[nsautoreleasepool alloc] init]; int retval = uiapplicationmain(argc, argv, nil, nil); thread 1 signal sigabrt [pool release]; return retval; i think problem solve way : set self.window.rootrootcontroller after [self.window makekeyandvisible] [window setrootviewcontroller:viewcontroller]; please see link : “application windows expected have root view controller @ end of application launch” error when runni

ruby on rails - MiniTest testing wrong class -

i new minitest, have used rspec in past. have issue put move object table after been deleted. have 2 classes named similar 1 namespace , other not. see below description in code. of other gems using minitest minitest-spec-rails , shoulda. appreciated. user.rb class user < activerecord::base self.table_name = 'users' end cache/user.rb module cache class user < activerecord::base self.table_name = 'cache_users' end end test/models/cache/user_test.rb require 'test_helper' module cache class usertest < activesupport::testcase #this tests user not cache::user end end i found solution this. class cache::usertest < activesupport::testcase @model = cache::user #this tell we're testing end

php - Secure Laravel website hosting -

i developed website using laravel , on web hoster have not find public directory , changed server.php from require_once __dir__.'/public/index.php'; to require_once __dir__.'/index.php'; and moved contents of public folder in root , website works problem when put example http://mywebsite.com/.env can show content of .env site not protected. the question : how can protect files , directories ? example of structure want: index.php .htaccess favicon.ico img/ css/ js/ laravel/ app/ bootstrap/ database/ config/ storage/ .env server.php ... content of root of site => public folder content laravel directory => other directories , files place in public folder , revert changes server.php. in top level directory add .htaccess file code below: <ifmodule mod_rewrite.c> rewriteengine on rewriterule ^(.*)$ public/$1 [l] </ifmodule>

java - how to store button colour value in shared preference and used in condition and change button colour while click the button -

in app have show event invitation if click invitation yes no maybe button displayed , if click of button colour of button should change , should hold colour forever until change response(yes no maybe). here posted code public class invitationfragment extends fragment { layoutinflater inflater; viewgroup container; bundle savedinstancestate; private list<string> eventname = new arraylist<>(); private list<long> eventid = new arraylist<>(); private list<string> eventplace = new arraylist<>(); private list<eventmo> eventmos = new arraylist<>(); private list<long> eventuserid = new arraylist<>(); private context context; private useroccasions useroccasions; private userdelegate userdelegate = new userdelegate(); private eventdelegates eventdelegates = new eventdelegates(); private gson gson = new gson(); private progressdialog prgdialog; private usermo usermo; p

HTTP Error in Swift 2 -

Image
this question has answer here: transport security has blocked cleartext http 23 answers whenever try load url or gain data specific url follows http:// format. xcode returns me error nsurlsession/nsurlconnection http load failed (kcfstreamerrordomainssl, -9802) how can fix/work way around this i not sure have update info.plist file adding key: <key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key><true/> </dict> or can add way , like: or can add specific domain like: <key>nsapptransportsecurity</key> <dict> <key>nsexceptiondomains</key> <dict> <key>yourserver.com</key> <dict> <!--include allow subdomains--> <key>nsincludessubdomains</key> <true/> <!--includ

C++ error in sort function -

i'm making student record system assignment. when trying run program error: "error: conversion '' non-scalar type 'std::stringstream' requested" it's coming stringstream key = student[j].getlastname line. not sure wrong. #include <sstream> #include <iostream> #include <fstream> #include "date.h" #include "address.h" #include "student.h" using namespace std; int main(){ string line; ifstream inputfile("studentdata.txt"); bool keepgoing = true; student *student = new student[50]; int = 0; while(!inputfile.eof()){ getline(inputfile, line); student[i].setinfo(line); i++; } int choice; cout << "a heap of students"; while(keepgoing){ //this while loop creates menu , asks user input cout << "what do?" << endl; cout << "1. print full report." << e

asp.net - How to write the radcombobox selectedindexchange event in javascript? -

i don't know how write javascript function in radcombobox selectedindexchange. asp.net <tr> <td> <asp:label runat="server" id="label73" cssclass="labels" text="call response"></asp:label> </td> <td> <telerik:radcombobox runat="server" skin="metro" id="cbocallresponse" autopostback="true" emptymessage="select call response" zindex="100001"> <items> <telerik:radcomboboxitem value="attended" text="attended" /> <telerik:radcomboboxitem value="noanswer" text="noanswer" /> <telerik:radcomboboxitem value="callbacklater" text="callbacklater" />

PHP. How can i check if a Switch case statement has executed? -

is possible check if switch case statement has found match in case part , executed successfully, , if doesn't, how execute else? eg switch($type) { case "1": { echo "something"; break; } case "2": { echo "something else"; break; } } on simple level... switch ($type) { case "1": // code executed echo('executed 1'); break; case "2": // code executed echo('executed 2'); break; case "3": // code executed echo('executed 3'); break; default: // code executed if different other conditions; } your syntax incorrect also... help?

database - How To Prevent From Deleting And ReAdding Entity Framework .emdx File in C# Project -

i working on management system of fan industry using c# , entity framework. project based on live requirements.i have adopted database first approach. whenever make changes in m database have delete project app.config , model.emdx file , re-generate model.emdx file. me how can avoid this. you've use code first approach purpose. because in database first approach there no way change database .edmx file c# project.

Diff between Dotfuscator (PreEmptive solutions) & Application Insights -

i trying find way track usage of desktop applications , came across preemptive solutions , application insights , still can't see difference in perimeter, maybe have wrong impression feel app. insights "included" in preemptive solutions offers, can me see difference ? thks as many usage analytics solutions, there large body of features/capabilities common (at least 10k feet), , have many smaller differences when examined closely. however, there few fundamental differences in approaches between app insights , preemptive: ai saas offering, preemptive "box" product (i believe offer cloud-hosted version). assumes different pricing models main instrumentation model preemptive through code injection (potentially part of obfuscation process). ai offers sophisticated sdk , tight integration visual studio ide. preemptive has sdk ai offers usage analytics part of broader application performance , analytics offering. ai capable of capturing wider range o

database - Mysql : join three tables with cardinality 1:N -

i have database academy school. structure has 3 tables: - first 1 master of subjects. table have on 20 rows. create table `subjects` ( `id_sb` tinyint(4) not null auto_increment, `name` varchar(255) default null, primary key (`id_sb`) ) -the second 1 contains students data. 1 have on 10000 rows. create table `students` ( `id_st` int(10) not null auto_increment, `name` varchar(50) default null, primary key (`id_st`) ) -the last 1 has student's qualifications each subject. has around 1000 rows. create table `qualifications` ( `id_cf` int(10) not null auto_increment, `id_st` int(10) default null, `id_sb` int(10) default null, `value` int(2) default null, primary key (`id_cf`) ) i need export these data in excel format, like: id:st / name / subject1/ subject2/ subject3/ subject4/..../subject_n (if 1 student has no qualification subject, excel show empty cell column). how can join these tables? have thought using left join, number of returnin

How to pass multiple files for same input parameter in hadoop -

i have 2 input files, , need pass both files under same parameter in hadoop. eg: hadoop jar somemainclass -d testinput=file1,file2 i don't want combine files 1 file used based on user condition. tried giving parameter -d testinput twice, took last file , not first file. if pass multiple instances of same parameter, value of first instance going overwritten value of second instance. you can specify multiple values same parameter, separating values commas. for e.g. <property> <name>yarn.resourcemanager.zk-address</name> <value>zk1:2181,zk2:2181,zk3:2181</value> </property> so, while passing values through command line, can specify -dtestinput=file,file2

javascript - got puzzled about promise in jQuery -

1 value can not change in promise example var t = function(s) { var wait = function(dtd) {     var dtd = $.deferred(); //new deferred object in function      var tasks = function() {       alert("complete!"); s = s + "hhh";       dtd.resolve(s); // change state of deferred object       };       settimeout(tasks, 5000); // return promise object return dtd.promise(s); }; } var s = "hhh"; $.when(t(s)) .then(function() { alert(s); }).then(function() { alert(s); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> i can got "hhh" instead of "hhhhhh"... 2 how invoke promise chain different values?like a.then(b(c)).then(f(d)) i put values in object , pass on chain... the alert in $.when alerting global variable not resolve in tasks also , never call wait()

List C# capacity is always 0 even though using a constructor with capacity ? -

given simple synchronization code : using system; using system.collections; using system.collections.generic; using system.linq; using system.text; using system.threading; using system.threading.tasks; namespace mutex { class calcarraythreads { private static system.threading.mutex mutex = new system.threading.mutex(); private const int threadsnumber = 10; private static list<int> list = new list<int>(10); public static void sumpartialarray(object index) { mutex.waitone(); int indexboxed = (int) index; int sum = 0; (int = indexboxed; < indexboxed + 9; i++) { sum += i; } console.writeline(string.format("thread : {0} calculated value : {1}", thread.currentthread.name, sum)); // list.add(sum); list[indexboxed] = sum; mutex.releasemutex(); // console.write

android - Shared Element Transition not working on first load with Picasso -

i trying load image url imageview using picasso. the image shared transition inside cardview in recyclerview , second in linearlayout. first time request made element doesn't animate picasso needs load image view, on subsequent requests fine. how can ensure imageview has been populated before initiating transition? the solution in using postponeentertransition() , startpostponedentertransition() calls ensure picasso has finished loading image view before activity starts. this great blog entry this. below example of might use in oncreate activitycompat.postponeentertransition(this); picasso.with(this.getapplicationcontext()) .load("https://goo.gl/oiytor") .nofade() .fit() .centerinside() .error(r.drawable.user_placeholder_error) .into(((imageview) findviewbyid(r.id.game_view_image)), new callback() { @override public void onsuccess() { activitycompat.startpostponedentertransition(targetactivi

android : camera doesn't open in marshmallow -

so, have below code open camera, capture image , save on sdcard. public void getphotofromcamera() { intent takepictureintent = new intent(mediastore.action_image_capture); file mediastoragedir = new file( environment.getexternalstoragedirectory() + file.separator + getstring(r.string.directory_name_corp_chat) + file.separator + getstring(r.string.directory_name_temp) ); if (!mediastoragedir.exists()) { mediastoragedir.mkdirs(); } string timestamp = new simpledateformat("yyyymmdd_hhmmss", locale.getdefault()).format(new date()); try { mediafile = file.createtempfile( "temp_full_img_" + timestamp, ".jpg", mediastoragedir ); takepictureintent.putextra(mediastore.extra_output, uri.fromfile(mediafile)); startactivityforresult(takepicture

wordpress - Why is $wp_query->post unset during 404? -

i using plugin called connections. when 404 occurs (for reason, i.e. page doesn't exist accessed via browser) custom post callback filter, specified in plugin's code breaks, $wp_query->post unset. complaint trying property of non-object when $wp_query->post->id accessed. expect. i have disabled other plugins , gone twenty fifteen theme issue still occurs. on clean install problem doesn't occur. doesn't make sense me. if it's not plugin or theme issue , it's not in wordpress core issue? corrupt database? (everything else seems working fine). the filter callback here: public static function filterposttitle( $title, $id = 0 ) { global $wp_query, $post, $connections; // added: if add line problem goes away. if ( is_404() ) return $title; // whether or not filter page title current directory location. if ( ! cnsettingsapi::get( 'connections', 'connections_seo', 'page_title' ) ) return $title; // if un

javascript - Change css dynamically with window.resize() -

is there variant change block width window.resize() , if have set rules? let's have block width , width jquery: var $block_1_width = $(".block_1").width(); i need make block have same width, first one. so, write: var $block_2 = $(".block_2"); $block_2.css("width", $block_1_width + "px"); if load page, work fine, want them dynamically keep same size @ window width when user resizes page. so, try: $(window).resize(function() { $block_2.css("width", $block_1_width + "px"); }); and doesn't. know when wrote $block_2.css("width", $block_1_width + "px") , jquery set inline style $block_2 . mean cannot override window.resize() ? you need re-calculate $block_1_width after resize so: $(window).resize(function() { var $block_1_width = $(".block_1").width(); $block_2.css("width", $block_1_width + "px"); });

python - manipulating multiindex columns in Pandas -

i have simple multiindex dataframe in pandas. i'm trying add additional subcolumns, i'm being warned off settingwithcopywarning: value trying set on copy of slice dataframe. try using .loc[row_indexer,col_indexer] = value instead i cannot manage right indexing incantation make work. attaching code fragment has simple, non-hierarchical example of sorts of columns want add. have hierchical example demonstrate how can add new top-level colummns, cannot manipulate individual sub-columns import pandas pd import numpy np #simple example works: add 2 columns non-hierarchical frame sdf = pd.dataframe(np.random.randn(6,4),columns=list('abcd')) sdf['e'] = 7 sdf['f'] = sdf['a'].diff(-1) #hierarchical example df = pd.dataframe({('co1', 'price'): {0: 1, 1: 2, 2:12, 3: 14, 4: 15},\ ('co1', 'size'): {0: 1, 1: 5, 2: 9, 3: 13, 4: 17},\ ('co2', 'price'): {0: 2, 1: 6, 2: 10, 3: 14, 4: 18},\ ('co

javascript - Trying to get a regex to recognize and extract words from both camelCase and CamelCase -

i've got halfway working. works great: 'myownvar'.match(/([a-z]*)([a-z][a-z]+)/g) result: ["my", "own", "var"] the goal pull out individual words. if pass camelcase name it: 'myownvar'.match(/([a-z]*)([a-z][a-z]+)/g) i get: ["myown", "var"] i can't figure out i'm doing wrong. far can tell, 2 sets of () should store matching results in 2 separate array elements. it's lumping them in reason. if have understood question following regex should trick: /([a-za-z][a-z]+)/g in case single character (as "m" in "mownvariable") should considered word : /([a-za-z][a-z]*)/g

How to turn off windows integrated authentication in Chrome -

i used able disable windows integrated authentication updating settings in ie. no longer works. has changed in recent versions of chrome? there new way turn off? chrome version 46.0.2490.71 i used use setting in ie internet options -> advanced -> uncheck 'enable windows integrated authentication' i got response internal admin , seems work. i think best came create shortcut chrome.exe on desktop , modify target of shortcut like: "c:\program files (x86)\google\chrome\application\chrome.exe" --auth-server-whitelist="_" edit: corrected path misplaced backslashes. note (x86), in case.

html - Why are there spaces in my paragraph when using <a href> tag? -

i have been troubling way how put single text in paragraph tag. everytime add anchor tag keeps entering want @ side of text not below. please me. this image and code ccs: <style> div.box { width: 168px; height: 300px; margin: 10px; float:left; background-color:#333; } table.shop { height: 450px; overflow-y:scroll; display: block; } ul.aa { list-style-type: none; margin: 0; padding: 0; } li { float:left; } { display:block; width: 200px; } a.head:link {text-decoration:none; font-family:"century gothic"; font-size:18px; color:#fff;} a.head:visited {text-decoration:none; font-family:"century gothic"; font-size:18px; color:#fff;} a.head:hover {text-decoration:none; font-family:"century gothic"; font-size:18px; color:#fff;} a.head:active {text-decoration:underline; font-family:"century gothic"; font-size:18px; color:#fff;} a.foot:link {text-decoration:none; font-family:"centu

c++ - Could not find encryption dll dbfips16.dll with Sql Anywhere 16 -

i have problem, if deploy 64bit application on customer computer, error message: encryption dll "dbfips16.dll" not loaded. the curious thing is, on notebook , other computers it's working pretty well. tried add dll's our deployment, not find in sybase 16 directory, have download seperatly? (i did not want use encryption) p.s. use simple file based deployment. edit i use sybase 16 ado.net driver (c#). the problem appears on 1 server. edit server=***;dbn=***;charset=utf-8;links=tcpip;uid=***;pwd=***;enc=none the dbfips16.dll loaded when connection string tells client use fips-validated encryption. if don't want use encryption @ all, encryption parameter should not set, or should set "none". check make sure sqlconnect environment variable not set (or doesn't contain encryption parameter). if doesn't help, can post contents of connection string and/or dsn? disclaimer: work sap in sql anywhere engineering.

mysql - phpMyAdmin Error Code 403 -

system info: synology nas 412+ phpmyadmin 4.4.7 mariadb 5.5.43 files located @ /volume1/web/phpmyadmin/ issue description: logging phpmyadmin presented error code 403 error in processing request error code: 403 error text: forbidden questions: what file need change where located how restart http server (if necessary) cmd i know it's phpmyadmin permissions, can't seem see how or change. got it. had .htaccess file in /web directory had been written ithemes security plugin. had disabled access. replaced file fresh copy found on wordpress forum. here's contents should want same. # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress

Django custom serializer how to input ID/PK -

i trying make custom serializer work. can't use model serializer since saving data multiple models. here code: class rushserializer(serializers.serializer): keyword = serializers.integerfield(read_only=true) url = serializers.urlfield() def save(self): keyword = self.validated_data['keyword'] url = self.validated_data['url'] url1.objects.create(keyword=keyword, url=url) and input data this: nov = {'url': 'https://domain.com/'} nov['keyword'] = id serializer = rushserializer(data=nov) it returns me error: keyerror @ /admin/keywords/kw/add/ 'keyword' here model itself: class url1(models.model): keyword = models.foreignkey(kw) url = models.urlfield() what wrong code? tried pretty anything here can't seem make work. edit: clarify, works if model serializer , this: class meta: model = url1 fields = ('keyword', &#