Vote count: 0 I know that if I want to forcibly overwrite a local repo with files from a remote repo, I do this: git fetch --all git reset --hard origin/master The problem with this is that when I go to look at the history of the local repo, it has completely obliterated the history and replaced it with a carbon copy of the history of the remote repo. Is there a way I can do this forcible overwrite while still preserving the history? For example, if I have a file in the local repo with the following content: - ContentA - ContentB - ContentC And I have the same file in the remote repo with the following content: - ContentA - ContentC - ContentD After the pull from the remote repo, I want the ...
ادامه مطلبVote count: 0 mapping: { "mappings": { "branch": {}, "employee": { "_parent": { "type": "branch" } } } } documents of branch: { "index": { "_id": "london" }} { "name": "London Westminster", "city": "London", "country": "UK" } { "index": { "_id": "liverpool" }} { "name": "Liverpool Central", "city": "Liverpool", "country": "UK" } { "index": { "_id": "paris" }} { "name": "Champs Élysées", "city": "Paris", "country": "France" } documents of employee: { "index": { "_id": 1, "parent": "london" }} { "name": "Alice Smith", "dob": "1970-10-24", "hobby": "hiking" } { "index": { "_id": 2, "parent": "london" }} { "name": "Mark Thomas", "dob": "1982-05-16", "hobby": "diving" } { "index": { "_id": 3, "pa...
ادامه مطلبVote count: 0 Let's say there're eight items in the database from C to J, C D E F G H I J, and I want 5 items per page. I will get C D E F G if I go to page 1 and H I J if I go to page two. While I'm in page one seeing C D E F G if the database is updated to A B C D E F G H I J and I go to page two, I will get H I J and not F G H I J(which is good because I don't want the same items twice). How does this work? And does pagination gems in rails(Kaminari and will_paginate) have this behavior by default? asked 41 secs agoSanti Santichaivekin Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have the following hardcoded formula in vba, which keeps giving me an error when i try to execute it. Is it the """" that is causing the syntax error? Thanks in advance. IF(isnblank(VLOOKUP([@[Uid]],tblProjectPlan[[Uid]:[Adjusted Sart]],13,false)),"""",VLOOKUP([@[Uid]],tblProjectPlan[[Uid]:[Adjusted Start]],13,false)) asked 1 min agohuehuehuehuehuehuehuehuehuehue Let's block ads! بخوانید...
ادامه مطلبVote count: 0 So, I'm trying to have a key pressed once on program launch. This is what I have, I'm a noob so please bare with me: { Send, {F11} } Now when I launch the program it doesn't send the key. Help? Thank you for any help you can provide asked 26 secs agoIanB Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I use this css code for box shadow but I get only on the top and bottom Look like this div#blog-pager { border-radius: 2px; -webkit-box-shadow: 0 0 3px rgba(0,0,0,.35); -moz-box-shadow: 0 0 3px rgba(0,0,0,.35); box-shadow: 0 0 3px rgba(0,0,0,.35);} this css style don't have shadow style #blog-pager{background:#fff;clear:both;width:auto;padding:20px;line-height:normal;position:relative;display:block;text-align:right;overflow:visible;margin:20px 0 5px 0} I don't know if this code above affect the code I added This is my blog : Blog asked 11 secs agoyoussef elmajbri Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to build a model class for my PHP application. It will have methods meant to select/update/insert/delete specific data from a database according to the method's parameters. I only want to use prepared statements. Here is an overview of what the class should look like : class Database { private $_db; // Stores a PDO object (the coection with the database) within the $_db property public function __construct($host, $user, $password) {...} public function select() {...} public function update() {...} public function insert() {...} public function delete() {...} } The problem is that I don't really know how to do this. Let's say I want to select everything from the table "fa...
ادامه مطلبVote count: 0 here's is my code, what's wrong with it as far the chart background color goes ... i know everything else works, but i caot change the background color whatsoever.and i keep looking at the documentation and i keep coming to the same conclusion... Nothing. the code itself retrieves all of the specified variables, builds the chart and changes the **HTML background, but fails to receive the chart background color change google.charts.load('current', {'packages':['bar']}); google.charts.setOnLoadCallback(drawStuff); var goal = ; var complete = ; var dmr = ; var wysb = ; function drawStuff() { var data = new google.visualization.arrayToDataTable([ ['Type', 'Quantity:'], ["Goal", goa...
ادامه مطلبVote count: 0 I've looked at the source code for __future__.py and it makes no sense to me -- how does this actually work, to change the behavior of division? asked 49 secs agoJason S Let's block ads! بخوانید...
ادامه مطلبVote count: 0 There is a Yii2 project. And I needed to make temporary redirect from domain sitename .ru to subdomain ru. sitename.com for all pages, except some ones (which begins with /news). I've made the following: RewriteEngine On AddDefaultCharset UTF-8 php_value upload_max_filesize 20M php_value post_max_size 25M php_value memory_limit 256M RewriteCond %{REQUEST_URI} !^/news.*$ RewriteRule (.*) http://ru.sitename.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [L] As a result all redirects works properly. But when I try to open pages which begins with /news, then the index.php file downloading process starts. How can...
ادامه مطلبVote count: 0 Let's say i've a lot of different of sub-domains , I want to redirect each request to the server so it will response with different action on each request of sub-domain (with text or html generated on server) I'm working with EJB 3.1 on Tomcat 7 using web.xml http://companyName1/mycompany.com responce to client: "hello aaa companyName1 ..." http://companyName2/mycompany.com responce to client: "hello bbb companyName2 ..." http://companyName3/mycompany.com responce to client: "hello ccc companyName3 ..." What is correct web.xml or server.xml mapping to solve this issue ?? Thanks!! asked 34 secs agoVitaly Tarasiuk Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have read various different instructions but am struggling to get my app set up as a single executable file which can be added to any desktop. None of the instructions I have come across give simple step by step instructions. My app is very simple in that it is just JQuery and HTML5. It doesn't use any node.js or anything and so I assumed it owuld be simple to package up and distrubute. Can any help direct me to simple step by step instructions? many thanks, asked 36 secs agoLeeTee Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a scrollable div. In OS X, the scrollbars auto-hide themselves, which is a bit prettier than always-visible scrollbars but sometimes confuses my users. The general response to this issue is to use ::-webkit-scrollbar: How can I prevent scroll bars from being hidden for OS X trackpad users in WebKit/Blink? CSS - Overflow: Scroll; - Always show vertical scroll bar? http://blog.0100.tv/2012/11/webkit-scrollbars-on-os-x/ The trouble with these solutions is that they also impact Chrome users on Windows, and I'd like to keep Chrome users on Windows having the same scrolling experience they're used to. Is there a way to either prevent the scrollbar from hiding on OS X without c...
ادامه مطلبVote count: 0 I'm debugging an app on a Windows 10 Mobile phone (Lumia 550) from Visual Studio on my PC. At some point the app simply closes on the phone and it shows the start screen. The problem is that Visual Studio doesn't show anything. Not an exception, not even stops debugging. Though sometimes it does hang, usually not. I created a breakpoint and it seems (but I'm not sure of that) to run fine until it tries to retu from an async method, perhaps to a caller that doesn't exist anymore. That's when the app crashes. I then removed the "await" and verified that the method is executed, and (on a separate run) - that the code after it is executed. Both run, and the crash is after them. I r...
ادامه مطلبVote count: 0 So, i research and looked at the new list of programming languages. I found out this Facebook's new programming language named as Hack. It says that it uses HHVM (i dont understand what that is). It also says that it is a new version of PHP. I want to try to lea the code but they dont give samples such as "Hello world" because all i see in hack codes are functions, etc. I mean i want to do basic. Also, it says it can be a java or a php, it depends on how the programmer codes. How does to embed hack codes into html then? just like in php? This is a sample text Also, there is no closing tags in hack so how will it identify what that certain code is? And why cant i download a soft...
ادامه مطلبVote count: 0 i am developing an excel web app addin for office365, my excel file is placed in one drive. when i open my excel file it shows in readonly mode. is it possible using office.js or any javascript code to detect if file is in readonly. i tried url in the browser changes if you edit the excel so that can be used to detect if file is in readonly mode or edit mode. right now you can see it as view.aspx page. i also tried using widnows.location, but as this app stays in iframe, its difficult to get parents url location. asked 1 min agoshyam_ Let's block ads! بخوانید...
ادامه مطلبVote count: 0 The question title says it all, I am not sure how to organize it in to my websites HTML due to the fixed menu bar, and its over all build. So to say, I want my website to have multiple backgrounds that fade in and out. I intend on adding more backgrounds over time. What I listed below is what I've been attempting to work with. I'll check back in an hour, thanks in advance. http://www.famebyname.us/ - My website. body { width: 400px; height: 400px; } /* set `#slideshow` parent background color */ .slideshow { background: #000; display:block; width:inherit; height:inherit; } #slideshow { width: 100%; height: 100%; display: block; opacity: 0.0; background-color: #000; /* set backg...
ادامه مطلبVote count: -1 I'm new to Programming so please forebear with me. I'm trying to do a replace syntax in Python but the syntax keeps showing an error. I've done research on the community and have tried various tactics and techniques suggested all resulting in futile. Please provide insights!!!!!! Thanks, asked 42 secs agoPLeaer Let's block ads! بخوانید...
ادامه مطلبVote count: 0 In application.conf, how do I use a environment variable to set a value, or a default if said environment variable is empty? asked 27 secs agoReactormonk Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a nodejs websocket server ruing in the cloud to which I can make a secured web socket coection from any location outside of corporate firewall. Now, how can I provide proxy information while creating a websocket coection from a resource behind corporate proxy (on-premise)? I am using this nodejs module from https://github.com/websockets/ws. I get EHOSTUNREACH error when I execute following code. Please note there is no vpn coection between cloud resource and the on premise resource. **var wss = new WebSocket('wss://cloudserver:443', { rejectUnauthorized: false });** With a sample code like below, I am able to make http coection to cloud from a resource behind corporate p...
ادامه مطلب