Posts

opengl es - MCPE GLSL Conditionals -

i'm writing ios vertex shader "flattens" mc world in x direction if change in z direction detected, , vice versa (the xz plane perp height). have several shaders warp world fine, writing pseudo movement detection hasn't worked. know conditionals costly. comparing position number , worked: if (worldpos.x != 4.) { worldpos.z = 0.; } but comparing position static call of position doesn't. far i've tried assigning constant floats x , z components, uniform floats, , pos4 uniform, no success. have feeling conditionals fail because of data type problem? easier debug if pe version displayed coord pc. any/all help! current code: uniform pos4 chunk_origin_and_scale; attribute pos4 position; void main() { pos4 worldpos; worldpos.xyz = (position.xyz * chunk_origin_and_scale.w) + chunk_origin_and_scale.xyz; worldpos.w = 1.; const float staticposx = worldpos.x; const float staticposz = worldpos.z; if (worldpos.x != staticposx) { worldpos.z = 0.; sta...

arrays - C# How to iterate through a list of files without using Directory.GetFiles() method -

i have several security cameras upload pictures ftp server. of these cams conveniently create subfolders @ start of new day in format "yyyymmdd". great , makes easy maintain/delete older pictures particular day. other cams aren't nice , dump pictures in giant folder, making deletion difficult. so writing c# windows form program go specific folder (source folder) using folderbrowserdialog , name target folder using fbd. using standard process iterate through file list using string array filled via directory.getfiles() method. use file's creation date create subfolder if doesn't exist. in either case move file date based subfolder. works great while testing small numbers of files. now i'm ready test against real data , i'm concerned folders having thousands of files, i'm going have many issues memory , other problems. how can string array handle such huge volumes of data? note 1 folder has on 28,000 pictures. can string array handle such large nu...

web services - An exception has occurred while using the formatter 'JsonNetMediaTypeFormatter' to generate sample for media type 'Application/Json' -

Image
this method. create project using asp.net soap restful converter template. soap webservice giving dataset response , it's working fine, want use converting web api. i created wrapper class manipulate soap method , response attached image. is possible dataset response json object? i beginner web api development.

Firebase Rules: What is .contains()? -

i have read through firebase documentation , not understand .contains() . below sample rules firebase database in documentation: { "rules": { "rooms": { "$room_id": { "topic": { // room's topic can changed if room id has "public" in ".write": "$room_id.contains('public')" } } } } } may know $room_id.contains('public') ? is referred child of $room_id ? $room_id matched wildcard key name appears parent of "topic". rule allowing writes if key name contains string "public" anywhere in it. so, if tried change value of /rooms/public_roomid/topic value, allowed. however, write of /rooms/roomid/topic rejected.

Same login on two different Laravel projects on same server -

i want create 2 portals on same server , diferent subdomain: app1.domain.com app2.domain.com i want separate in 2 different laravel projects, when authenticated in 1 of portals in other portal should authenticated. how can that? suggestions helpful i think looking sso for laravel in quick search found packages jasny/sso 1 of them, explained : how works when using sso, when can distinguish 3 parties: client - browser of visitor broker - website visited server - place holds user info , credentials the broker has id , secret. these know both broker , server. when client visits broker, creates random token, stored in cookie. broker send client server, passing along broker's id , token. server creates hash using broker id, broker secret , token. hash used create link users session. when link created server redirects client broker. the broker can create same link hash using token (from cookie), broker id , broker secret. when doing requests, passes...

sql server - Fact table referencing another fact table? -

we started working on our data warehouse. have technicians, salespersons, date, branch, customer our dimensions. have transactional tables in oltp such sales orders, agreements, referenced each other in situations. i'm planning put sales order, agreements info in fact tables. so, reference above mentioned dimensions in both fact tables. but, here comes problem. sales orders , service agreements need referenced each other. in cases, agreements information need referenced in sales orders. can reference 2 fact tables each other in fact table? sales orders table in oltp consists million records, , agreement table holds half million records(minimum). can let me know if can reference these 2 in fact table? do have agreementid can added each fact table , used drill across? degenerate dimension - dimension key without dimension table.

c# - NReco PdfGenerator disable selection -

i want disable selection, image, if contain text. i know pdf contain layers, dont find remove text layer. thanks. var htmltopdf = new nreco.pdfgenerator.htmltopdfconverter(); htmltopdf.size = nreco.pdfgenerator.pagesize.letter; htmltopdf.margins = new nreco.pdfgenerator.pagemargins() { bottom = 0, top = 0, left = 0, right = 0 }; string id = "test"; response.contenttype = "application/pdf"; response.appendheader("content-disposition", string.format("inline;filename=\"{0}.pdf\"", id)); htmltopdf.generatepdffromfile("page.aspx", null, response.outputstream); response.end(); pdfgenerator internally uses wkhtmltopdf , renders text content text blocks , selectable default; behavior cannot changed. if want guarantee text cannot selected should rendered image (= can render html image fi...